117 lines
5.1 KiB
TypeScript
117 lines
5.1 KiB
TypeScript
/* Metro module 15725; source: modules/provisional_accounts/MessageSessionMetadataManager.tsx; dependencies: [6, 7, 15, 17, 18, 661, 683, 4860, 2] */
|
|
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});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
|
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
|
value = _fun120763(value);
|
|
value = new value();
|
|
(require(2) /* metro dependency 2 */).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 closure = MessageSessionMetadataManager;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{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 items = [];
|
|
arraySpread(items, value, 0, items);
|
|
value = env1_5(MessageSessionMetadataManager);
|
|
binding = env1_4;
|
|
if (_isNativeReflectConstruct_120760()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items, env1_5(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.actions = {MESSAGE_CREATE: MESSAGE_CREATE_120765, MESSAGE_UPDATE: MESSAGE_UPDATE_120766};
|
|
return value;
|
|
}
|
|
|
|
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 object2;
|
|
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;
|
|
object2 = {};
|
|
id = a0.id;
|
|
object2.message_id = id;
|
|
object2.channel_id = a0.channel_id;
|
|
author = a0.author;
|
|
id = author == null ? value2 : author.id;
|
|
object2.author_id = id;
|
|
object2.authorized_application_ids = this._getAuthorizedApplicationIds(a0.session_metadata);
|
|
Reflect.apply(track, defaultImport, [MESSAGE_DISPATCH_SESSION_METADATA_FOUND, object2]);
|
|
}
|
|
}
|
|
|