/* Metro module 16266; source: modules/headless_tasks/android/DirectReply.tsx; dependencies: [5, 27, 4503, 3, 16260, 7067, 2] */ import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */ import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */ import HeadlessTaskUtils from '../HeadlessTaskUtils.tsx'; /* Metro dependency 16260 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as MessageConstantsModule from '../../messages/MessageConstants.tsx'; /* Metro dependency 4503 */ function _fun125724(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16474:6, offset: 0x025e1ea4, size: 168 bytes, params: 8, frame: 15 let value = Logger; value = new value('DirectReply'); module.exports = function(a0) { var env0_0 = a0; var Promise = global.Promise; var value = Object.create(Promise.prototype, {constructor: {value: Promise}}); var value2 = new Promise(_fun125726); return value2 instanceof Object ? value2 : value; }; (FileImportTrackerModule).fileFinishedImporting('modules/headless_tasks/android/DirectReply.tsx'); function exports_125725(a0) { // fn#125725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16474:151, offset: 0x025e1f4c, size: 46 bytes, params: 2, frame: 11 const env0_0 = a0; const Promise = global.Promise; const value = Object.create(Promise.prototype, {constructor: {value: Promise}}); const promise = new Promise(_fun125726); return promise instanceof Object ? promise : value; function _fun125726(a0) { // fn#125726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16474:167, offset: 0x025e1f7a, size: 110 bytes, params: 2, frame: 13 var environment; const env0_0 = a0; const value = environment.__proto__; env1_5.log('Executing DirectReply'); const PushNotificationAndroid = NativeModules.PushNotificationAndroid; PushNotificationAndroid.markNotificationAsDirectReply(env0_0.channelId); (HeadlessTaskUtils).awaitStorage(_fun125727); function _fun125727() { // fn#125727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16474:293, offset: 0x025e1fe8, size: 60 bytes, params: 1, frame: 12 env2_5.log('Storage loaded'); (function(a0) { return _sendMessage_125728.apply(this, arguments); })(env1_0); function _sendMessage_125728() { // fn#125728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16474:298, offset: 0x025e2024, size: 53 bytes, params: 1, frame: 13 var environment; const value = environment.__proto__.__proto__.__proto__; return env3_2(_fun125730).apply(this, arguments); function* _fun125730(a0) { // fn#125730, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16474:345, offset: 0x025e2064, size: 260 bytes, params: 2, frame: 22 var PushNotificationAndroid; var handleDirectReplySuccess; var JSON; var stringify; if (true) { value = environment.__proto__.__proto__.__proto__.__proto__.__proto__; var binding = env5_0; var value3 = binding(env5_1[5]); var sendMessage = value3.sendMessage; var channelId = a0.channelId; var object = {}; object.content = a0.channelReplyText; object.tts = false; object.invalidEmojis = []; object.validNonShortcutEmojis = []; var PUSH_NOTIFICATION = env5_4.PUSH_NOTIFICATION; yield Reflect.apply(sendMessage, value3, [channelId, object, false, {eagerDispatch: false, location: PUSH_NOTIFICATION}]); var value4 = undefined; if (false) { return value4; } binding = env5_5; binding.log('Sent message, ok:', value4.ok); if (value4.ok) { PushNotificationAndroid = env5_3.PushNotificationAndroid; handleDirectReplySuccess = PushNotificationAndroid.handleDirectReplySuccess; JSON = global.JSON; stringify = JSON.stringify; object = {}; copyDataProperties(object, value4.body, false); copyDataProperties(object, a0, false); Reflect.apply(handleDirectReplySuccess, PushNotificationAndroid, [Reflect.apply(stringify, JSON, [object])]); } value = environment.__proto__.__proto__.__proto__; env3_0(true); } } } } } } } global.__d(_fun125724, 16266, [5, 27, 4503, 3, 16260, 7067, 2]) /* metro module 16266, dependencies: [5, 27, 4503, 3, 16260, 7067, 2] */;