/* Metro module 15725; source: modules/provisional_accounts/MessageSessionMetadataManager.tsx; dependencies: [6, 7, 15, 17, 18, 661, 683, 4860, 2] */ import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */ import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */ import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */ import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */ import AutomaticLifecycleManager from '../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ function _fun120759(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15933:6, offset: 0x02534fd1, size: 248 bytes, params: 8, frame: 19 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = AutomaticLifecycleManager; value = _fun120763(value); value = new value(); (FileImportTrackerModule).fileFinishedImporting('modules/provisional_accounts/MessageSessionMetadataManager.tsx'); exports.default = value; function _isNativeReflectConstruct_120760() { // fn#120760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15933:173, offset: 0x025350c9, size: 98 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_120760_isNativeReflectConstruct = function() { return !!result; })(); } function _fun120763(a0) { // fn#120763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15933:376, offset: 0x0253512b, size: 149 bytes, params: 2, frame: 16 const MessageSessionMetadataManager2 = MessageSessionMetadataManager; Inherits(MessageSessionMetadataManager2, a0); return CreateClass(MessageSessionMetadataManager2, [{key: 'handleMessageCreate', value: function({message}) { this._trackIfSessionMetadataExists(message); }}, {key: 'handleMessageUpdate', value: function({message}) { this._trackIfSessionMetadataExists(message); }}, {key: '_getAuthorizedApplicationIds', value: function(a0) { var authorized_application_ids; var error; try { authorized_application_ids = a0.authorized_application_ids; } catch (error) { return null; } return authorized_application_ids; }}, {key: '_trackIfSessionMetadataExists', value: value_120770}]); function MessageSessionMetadataManager(a0) { // fn#120764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15933:388, offset: 0x025351c0, size: 164 bytes, params: 2, frame: 20 var r0; var Reflect; let value = copyRestArgs(0, undefined); let binding = env1_2; binding(this, MessageSessionMetadataManager); const items2 = []; arraySpread(items2, value, 0, items2); value = env1_5(MessageSessionMetadataManager); binding = env1_4; if (_isNativeReflectConstruct_120760()) { Reflect = global.Reflect; value = Reflect.construct(value, items2, env1_5(this).constructor); r0 = value; } else { value = value.apply(this, items2); r0 = value; } value = binding(this, r0); value.actions = {MESSAGE_CREATE: MESSAGE_CREATE_120765, MESSAGE_UPDATE: MESSAGE_UPDATE_120766}; return value; function MessageSessionMetadataManagerMESSAGE_CREATE(a0) { // fn#120765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15933:687, owner: MessageSessionMetadataManager.MESSAGE_CREATE, offset: 0x0215627f, size: 23 bytes, params: 2, frame: 11 return env0_0.handleMessageCreate(a0); } function MessageSessionMetadataManagerMESSAGE_UPDATE(a0) { // fn#120766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15933:730, owner: MessageSessionMetadataManager.MESSAGE_UPDATE, offset: 0x021562dd, size: 23 bytes, params: 2, frame: 11 return env0_0.handleMessageUpdate(a0); } } function value_120770(a0) { // fn#120770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15933:1187, offset: 0x0253528f, size: 136 bytes, params: 2, frame: 18 var id; var value; var value2; var defaultImport; var track; var MESSAGE_DISPATCH_SESSION_METADATA_FOUND; var object; var author; if (a0.session_metadata != null) { value = environment.__proto__; value2 = undefined; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; track = defaultImport.track; MESSAGE_DISPATCH_SESSION_METADATA_FOUND = AnalyticEvents.MESSAGE_DISPATCH_SESSION_METADATA_FOUND; object = {}; id = a0.id; object.message_id = id; object.channel_id = a0.channel_id; author = a0.author; id = author == null ? value2 : author.id; object.author_id = id; object.authorized_application_ids = this._getAuthorizedApplicationIds(a0.session_metadata); Reflect.apply(track, defaultImport, [MESSAGE_DISPATCH_SESSION_METADATA_FOUND, object]); } } } } global.__d(_fun120759, 15725, [6, 7, 15, 17, 18, 661, 683, 4860, 2]) /* metro module 15725, dependencies: [6, 7, 15, 17, 18, 661, 683, 4860, 2] */;