/* Metro module 8916; source: actions/CallActionCreators.tsx; dependencies: [1379, 3793, 1878, 661, 4796, 507, 683, 4647, 1244, 8783, 8917, 694, 2] */ function _fun69582(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:6, offset: 0x01c77542, size: 232 bytes, params: 8, frame: 19 var object2; const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const constantsModule = require(661) /* metro dependency 661: Constants */; const env0_6 = constantsModule.Endpoints; const env0_7 = constantsModule.AnalyticEvents; const env0_8 = constantsModule.ChannelTypesSets; const env0_9 = constantsModule.ChannelTypes; object2 = {call: call_69583, ring: ring, stopRinging: function(a0, a1) { var HTTP = require(dependencyMap[5]).HTTP; var object = {}; object.url = Endpoints.CALL_STOP_RINGING(a0); object.body = {recipients: a1}; object.oldFormErrors = true; object.rejectWithError = true; return HTTP.post(object); }}; (require(2) /* metro dependency 2 */).fileFinishedImporting('actions/CallActionCreators.tsx'); exports.default = object2; } function call_69583(a0, a1, a2, a3, a4) { // fn#69583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:210, offset: 0x01c7762a, size: 214 bytes, params: 6, frame: 16 var HTTP; var get; var object2; const env0_1 = a0; const env0_2 = a1; const env0_3 = a2; const env0_4 = a3; const env0_5 = a4; if (a3 != null) { if (RelationshipStore.isBlocked(a3)) { return undefined; } var env0_7 = UserStore.getUser(a3); HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP; get = HTTP.get; object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true}; object2.url = Endpoints.CALL(a0); Reflect.apply(get, HTTP, [object2]).then(function(a0) { doCall(importDefault && a0.body.ringable); }, _fun69586); } else { doCall(a2); } } function ring(a0, a1, a2) { // fn#69588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:870, offset: 0x01c7792a, size: 324 bytes, params: 4, frame: 19 var object2; var HTTP; var post; const channel = ChannelStore.getChannel(a0); if (channel != null) { var canRingUsersInChannel2 = (require(8917) /* metro dependency 8917: useCanRing */).canRingUsersInChannel(channel); var CALLABLE = ChannelTypesSets.CALLABLE; var value3 = CALLABLE.has(channel.type); if (canRingUsersInChannel2) { HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP; post = HTTP.post; object2 = {}; object2.url = Endpoints.CALL_RING(a0); object2.body = {recipients: a1, analytics_location: a2}; object2.oldFormErrors = true; object2.rejectWithError = true; Reflect.apply(post, HTTP, [object2]); if (channel.type === ChannelTypes.GUILD_VOICE && a1 != null) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_LOCAL_RING_START', ringing: a1, guildId: channel.guild_id}); } return undefined; } if (value3) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CALL_ENQUEUE_RING', channelId: a0, recipients: a1}); } } } function doCall(a0) { // fn#69584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:237, owner: call_69583.doCall, offset: 0x01c77700, size: 98 bytes, params: 2, frame: 15 let value = environment.__proto__; value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */; value.selectVoiceChannel(env0_1, require); if (a0) { env0_0.ring(env0_1); } if (env0_5 != null) { env0_5(env0_1); } } function _fun69586() { // fn#69586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:470, offset: 0x01c77789, size: 350 bytes, params: 1, frame: 22 const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; const track = defaultImport.track; const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT; Reflect.apply(track, defaultImport, [OPEN_POPOUT, {'type': 'Not Friend', 'source': 'Call'}]); const defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */; const show = defaultImport2.show; const object2 = {}; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; let string = intl.string; const t = (require(1244) /* metro dependency 1244: indexNative */).t; const My50nf = t.My50nf; object2.title = Reflect.apply(string, intl, [My50nf]); const format = intl.format; const IdKo2z = t.IdKo2z; const username = env0_7 != null ? env0_7.username : ''; object2.body = Reflect.apply(format, intl, [IdKo2z, {username: username}]); object2.confirmText = intl.string(t['PMsq/b']); string = intl.string; const BddRzS = t.BddRzS; object2.cancelText = Reflect.apply(string, intl, [BddRzS]); object2.onConfirm = onConfirm_69587; Reflect.apply(show, defaultImport2, [object2]); } function onConfirm_69587() { // fn#69587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9101:774, offset: 0x01c778e7, size: 67 bytes, params: 1, frame: 14 const value = environment.__proto__.__proto__; (importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */).addRelationship({userId: importAll, context: {location: 'Call'}}); }