90 lines
4.6 KiB
TypeScript
90 lines
4.6 KiB
TypeScript
/* Metro module 16266; source: modules/headless_tasks/android/DirectReply.tsx; dependencies: [5, 27, 4503, 3, 16260, 7067, 2] */
|
|
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
|
|
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
|
|
const env0_4 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
|
|
let value = importDefault(3) /* metro dependency 3: 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;
|
|
};
|
|
(require(2) /* metro dependency 2 */).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);
|
|
(importDefault(16260) /* metro dependency 16260: 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 object2 = {};
|
|
object2.content = a0.channelReplyText;
|
|
object2.tts = false;
|
|
object2.invalidEmojis = [];
|
|
object2.validNonShortcutEmojis = [];
|
|
var PUSH_NOTIFICATION = env5_4.PUSH_NOTIFICATION;
|
|
yield Reflect.apply(sendMessage, value3, [channelId, object2, 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;
|
|
object2 = {};
|
|
copyDataProperties(object2, value4.body, false);
|
|
copyDataProperties(object2, a0, false);
|
|
Reflect.apply(handleDirectReplySuccess, PushNotificationAndroid, [Reflect.apply(stringify, JSON,
|
|
[object2])]);
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
env3_0(true);
|
|
}
|
|
}
|
|
|