78 lines
4.2 KiB
TypeScript
78 lines
4.2 KiB
TypeScript
/* Metro module 11429; source: modules/guild_templates/AcceptGuildTemplateActionCreators.tsx; dependencies: [4257, 1867, 661, 694, 507, 6947, 2] */
|
|
function _fun87485(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:6, offset: 0x01fc07be, size: 163 bytes, params: 8, frame: 19
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
|
object2 = {acceptGuildTemplate: acceptGuildTemplate};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_templates/AcceptGuildTemplateActionCreators.tsx');
|
|
exports.default = object2;
|
|
}
|
|
|
|
function acceptGuildTemplate(a0, a1, a2) { // fn#87486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:159, offset: 0x01fc0861, size: 111 bytes, params: 4, frame: 14
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_TEMPLATE_ACCEPT', code: a0});
|
|
const Promise = global.Promise;
|
|
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
|
const promise = new Promise(_fun87487);
|
|
return promise instanceof Object ? promise : value;
|
|
}
|
|
|
|
function _fun87487(a0, a1) { // fn#87487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:238, offset: 0x01fc08d0, size: 147 bytes, params: 3, frame: 18
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const value = environment.__proto__;
|
|
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
|
const post = HTTP.post;
|
|
const object2 = {};
|
|
object2.url = Endpoints.UNRESOLVED_GUILD_TEMPLATE(env0_0);
|
|
object2.body = {name: require, icon: importDefault};
|
|
object2.oldFormErrors = true;
|
|
object2.rejectWithError = false;
|
|
Reflect.apply(post, HTTP, [object2]).then(_fun87488, _fun87490);
|
|
}
|
|
|
|
function _fun87488({body}) { // fn#87488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:365, offset: 0x01fc0963, size: 167 bytes, params: 2, frame: 16
|
|
var environment;
|
|
const env0_0 = body;
|
|
let value = environment.__proto__.__proto__;
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_TEMPLATE_ACCEPT_SUCCESS',
|
|
code: env1_0, guild: body});
|
|
if (GatewayConnectionStore.isConnected()) {
|
|
GuildStore.addConditionalChangeListener(_fun87489);
|
|
} else {
|
|
value = require(6947) /* metro dependency 6947: transitionToGuildNative */;
|
|
value.transitionToGuild(body.id);
|
|
env0_0(body);
|
|
}
|
|
}
|
|
|
|
function _fun87490({body}) { // fn#87490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:625, offset: 0x01fc0a6c, size: 80 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__.__proto__;
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_TEMPLATE_ACCEPT_FAILURE',
|
|
code: env1_0});
|
|
require(body);
|
|
}
|
|
|
|
function _fun87489() { // fn#87489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:502, offset: 0x01fc0a0a, size: 98 bytes, params: 1, frame: 13
|
|
var transitionToGuild;
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
const getGuild = GuildStore.getGuild;
|
|
if (Reflect.apply(getGuild, GuildStore, [body.id]) != null) {
|
|
value = require(6947) /* metro dependency 6947: transitionToGuildNative */;
|
|
transitionToGuild = value.transitionToGuild;
|
|
bodyBinding = body;
|
|
Reflect.apply(transitionToGuild, value, [bodyBinding.id]);
|
|
value = environment.__proto__;
|
|
env1_0(bodyBinding);
|
|
return false;
|
|
}
|
|
}
|
|
|