89 lines
4.5 KiB
TypeScript
89 lines
4.5 KiB
TypeScript
/* Metro module 11170; source: modules/messages/retrySendMessage.native.tsx; dependencies: [4503, 7067, 8050, 4648, 7880, 2] */
|
|
import MessageActionCreators from '../../actions/MessageActionCreators.tsx'; /* Metro dependency 7067 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as MessageConstantsModule from './MessageConstants.tsx'; /* Metro dependency 4503 */
|
|
|
|
function _fun85306(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11356:6, offset: 0x01f6a9b8, size: 124 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/messages/retrySendMessage.native.tsx');
|
|
exports.default = retrySendMessage;
|
|
function retrySendMessage(a0, a1, a2) { // fn#85307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11356:214, offset: 0x01f6aa34, size: 380 bytes, params: 4, frame: 28
|
|
var r12;
|
|
var object;
|
|
var content;
|
|
var tts;
|
|
var messageReference;
|
|
var flags;
|
|
var nonce;
|
|
var defaultImport2;
|
|
var sendMessage;
|
|
var object2;
|
|
const value = a3;
|
|
const env0_0 = a0;
|
|
const value2 = undefined;
|
|
const r3 = value !== value2 ? value : {};
|
|
const defaultImport = MessageActionCreators;
|
|
const deleteMessage = defaultImport.deleteMessage;
|
|
let id = a0.id;
|
|
Reflect.apply(deleteMessage, defaultImport, [id, a1.id, true]);
|
|
if (a1.isCommandType()) {
|
|
if (a1.interactionData != null && r3.applicationId != null) {
|
|
(require(8050) /* metro dependency 8050: executeCommand */).retryCommandMessage(a1, a0, r3);
|
|
}
|
|
} else {
|
|
content = a1.content;
|
|
tts = a1.tts;
|
|
messageReference = a1.messageReference;
|
|
flags = a1.flags;
|
|
nonce = a1.nonce;
|
|
r12 = a2 == null ? value2 : a2.map(_fun85308);
|
|
defaultImport2 = defaultImport;
|
|
sendMessage = defaultImport2.sendMessage;
|
|
id = a0.id;
|
|
object = {content: content, tts: tts, invalidEmojis: [], validNonShortcutEmojis: []};
|
|
object2 = {};
|
|
copyDataProperties(object2, r3, undefined);
|
|
object2['nonce'] = nonce;
|
|
object2['flags'] = flags;
|
|
object2['messageReference'] = messageReference ?? value2;
|
|
object2['location'] = MessageSendLocation.RETRY;
|
|
object2['attachmentsToUpload'] = r12;
|
|
object2['onAttachmentUploadError'] = retrySendMessageOnAttachmentUploadError;
|
|
Reflect.apply(sendMessage, defaultImport2, [id, object, value2, object2]);
|
|
}
|
|
return value2;
|
|
function _fun85308(a0) { // fn#85308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11356:486, offset: 0x01f6abb0, size: 62 bytes, params: 2, frame: 13
|
|
var r0;
|
|
var value2;
|
|
let value = a0;
|
|
if (value.on != null) {
|
|
r0 = value;
|
|
} else {
|
|
value2 = environment.__proto__;
|
|
value = (require(4648) /* metro dependency 4648: CloudUpload */).CloudUpload.fromJson(value);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function retrySendMessageOnAttachmentUploadError(a0, a1, a2) { // fn#85309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11356:755, owner: retrySendMessage.onAttachmentUploadError, offset: 0x01f6abee, size: 93 bytes, params: 4, frame: 14
|
|
let value = environment.__proto__;
|
|
value = require(7880) /* metro dependency 7880: handleUploadAttachmentErrorsNative */;
|
|
const handleUploadMessageAttachmentsErrors = value.handleUploadMessageAttachmentsErrors;
|
|
const object = {file: a0};
|
|
object.guildId = env0_0.getGuildId();
|
|
object.analyticsLocations = [];
|
|
object.code = a1;
|
|
object.reason = a2;
|
|
Reflect.apply(handleUploadMessageAttachmentsErrors, value, [object]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun85306, 11170, [4503, 7067, 8050, 4648, 7880,
|
|
2]) /* metro module 11170, dependencies: [4503, 7067, 8050, 4648, 7880, 2] */;
|