Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,246 @@
|
||||
/* Metro module 13056; source: modules/rpc/server/commands/activities.tsx; dependencies: [5, 661, 13026, 13014, 8081, 7504, 8076, 13018, 7860, 2] */
|
||||
function _fun99687(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13246:6, offset: 0x021d16e1, size: 301 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const env0_4 = value.RPCErrors;
|
||||
const env0_5 = value.ApplicationFlags;
|
||||
object2 = {};
|
||||
const GET_ACTIVITY_INSTANCE_CONNECTED_PARTICIPANTS = RPCCommands.GET_ACTIVITY_INSTANCE_CONNECTED_PARTICIPANTS;
|
||||
value = require(13026) /* metro dependency 13026: rpcSchema */;
|
||||
let createRPCCommand = value.createRPCCommand;
|
||||
const GET_ACTIVITY_INSTANCE_CONNECTED_PARTICIPANTS2 = RPCCommands.GET_ACTIVITY_INSTANCE_CONNECTED_PARTICIPANTS;
|
||||
const activityInstanceConnectedParticipantsScope = (require(13014) /* metro dependency 13014: activityInstanceConnectedParticipants */).activityInstanceConnectedParticipantsScope;
|
||||
object2[GET_ACTIVITY_INSTANCE_CONNECTED_PARTICIPANTS] = Reflect.apply(createRPCCommand, value,
|
||||
[GET_ACTIVITY_INSTANCE_CONNECTED_PARTICIPANTS2, {scope: activityInstanceConnectedParticipantsScope,
|
||||
handler: handler_99688}]);
|
||||
const REQUEST_PROXY_TICKET_REFRESH = RPCCommands.REQUEST_PROXY_TICKET_REFRESH;
|
||||
value = require(13026) /* metro dependency 13026: rpcSchema */;
|
||||
createRPCCommand = value.createRPCCommand;
|
||||
const REQUEST_PROXY_TICKET_REFRESH2 = RPCCommands.REQUEST_PROXY_TICKET_REFRESH;
|
||||
object2[REQUEST_PROXY_TICKET_REFRESH] = Reflect.apply(createRPCCommand, value, [REQUEST_PROXY_TICKET_REFRESH2,
|
||||
{scope: activityInstanceConnectedParticipantsScope, handler: handler_99689}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/activities.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function handler_99688({socket}) { // fn#99688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13246:357, offset: 0x021d180e, size: 75 bytes, params: 2, frame: 14
|
||||
const rpcHelpersModule = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
rpcHelpersModule.validatePostMessageTransport(socket.transport);
|
||||
return (require(13014) /* metro dependency 13014: activityInstanceConnectedParticipants */).activityInstanceConnectedParticipants();
|
||||
}
|
||||
|
||||
function handler_99689({socket}) { // fn#99689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13246:628, offset: 0x021d1859, size: 42 bytes, params: 2, frame: 11
|
||||
return env0_3(_fun99691)();
|
||||
}
|
||||
|
||||
function* _fun99691() { // fn#99691, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13246:645, offset: 0x021d188e, size: 364 bytes, params: 1, frame: 21
|
||||
var id;
|
||||
var object2;
|
||||
var prototype;
|
||||
var binding4;
|
||||
var property;
|
||||
var value11;
|
||||
var createProxyTicket;
|
||||
var value12;
|
||||
var proxyTicket;
|
||||
var value13;
|
||||
var value14;
|
||||
var error;
|
||||
var UNKNOWN_ERROR;
|
||||
var value15;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = undefined;
|
||||
let binding = env2_0;
|
||||
const binding2 = env2_2;
|
||||
const value4 = binding(binding2[4]);
|
||||
value4.validatePostMessageTransport(require.transport);
|
||||
const value6 = binding(binding2[4]);
|
||||
const validateApplication = value6.validateApplication;
|
||||
let application = require.application;
|
||||
const value7 = Reflect.apply(validateApplication, value6, [application]);
|
||||
const value8 = binding(binding2[5]);
|
||||
const hasApplicationFlag = value8.hasApplicationFlag;
|
||||
application = require.application;
|
||||
const EMBEDDED = env2_5.EMBEDDED;
|
||||
const hasApplicationFlag2 = Reflect.apply(hasApplicationFlag, value8, [application, EMBEDDED]);
|
||||
binding = env2_1;
|
||||
const binding3 = env2_2;
|
||||
if (!hasApplicationFlag2) {
|
||||
value = binding(binding3[6]);
|
||||
value = new value({errorCode: env2_4.UNAUTHORIZED_FOR_APPLICATION}, 'This application cannot access this API');
|
||||
throw value;
|
||||
}
|
||||
const value10 = binding(binding3[7])();
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding4 = env2_2;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
property = binding4[8];
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value11 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
createProxyTicket = value11.createProxyTicket;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value12 = value10 == null;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
if (value12) {
|
||||
id = value;
|
||||
} else {
|
||||
try {
|
||||
id = value10.id;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
}
|
||||
try {
|
||||
proxyTicket = Reflect.apply(createProxyTicket, value11, [value7, id]);
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
yield proxyTicket;
|
||||
try {
|
||||
value13 = undefined;
|
||||
value14 = false;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
if (value14) {
|
||||
return value13;
|
||||
}
|
||||
try {
|
||||
object2.ticket = value13;
|
||||
} catch (error) {
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[6]);
|
||||
object2 = {};
|
||||
UNKNOWN_ERROR = env2_4.UNKNOWN_ERROR;
|
||||
object2.errorCode = UNKNOWN_ERROR;
|
||||
prototype = value.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: value}});
|
||||
value = new value(object2, 'Failed to create proxy ticket');
|
||||
value = value instanceof Object ? value : value15;
|
||||
throw value;
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* Metro module 13017; source: modules/rpc/server/commands/application.tsx; dependencies: [4234, 4135, 661, 8079, 8081, 13018, 7504, 8076, 8097, 683, 507, 7502, 2] */
|
||||
function _fun99372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13207:6, offset: 0x021c5ddb, size: 246 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const RPC_LOCAL_SCOPE = (require(4135) /* metro dependency 4135: Constants */).RPC_LOCAL_SCOPE;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.ApplicationFlags;
|
||||
const env0_5 = constantsModule.Endpoints;
|
||||
const RPCCommands = constantsModule.RPCCommands;
|
||||
const env0_6 = constantsModule.RPCErrors;
|
||||
object2 = {};
|
||||
const SEND_ANALYTICS_EVENT = RPCCommands.SEND_ANALYTICS_EVENT;
|
||||
object2[SEND_ANALYTICS_EVENT] = {validation: validation, handler: handler_99374};
|
||||
const GET_APPLICATION_TICKET = RPCCommands.GET_APPLICATION_TICKET;
|
||||
object2[GET_APPLICATION_TICKET] = {scope: RPC_LOCAL_SCOPE, handler: handler_99375};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/application.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validation(a0) { // fn#99373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13207:247, offset: 0x021c5ed1, size: 110 bytes, params: 2, frame: 18
|
||||
let value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys = value.keys;
|
||||
const object2 = {};
|
||||
object2.event_name = a0.string().required();
|
||||
object2.event_properties = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0).required();
|
||||
return Reflect.apply(keys, value, [object2]);
|
||||
}
|
||||
|
||||
function handler_99374({socket, args}) { // fn#99374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13207:352, offset: 0x021c5f3f, size: 416 bytes, params: 2, frame: 21
|
||||
var object3;
|
||||
var activeAnalyticsSessionIDs;
|
||||
var track;
|
||||
var object4;
|
||||
const event_name = args.event_name;
|
||||
const event_properties = args.event_properties;
|
||||
var value;
|
||||
const rpcHelpersModule = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
rpcHelpersModule.validatePostMessageTransport(socket.transport);
|
||||
const moduleValue2 = rpcHelpersModule;
|
||||
moduleValue2.validateApplication(socket.application);
|
||||
const id = socket.application.id;
|
||||
const value3 = (importDefault(13018) /* metro dependency 13018: getCurrentEmbeddedActivityChannel */)();
|
||||
const guildId = value3?.getGuildId();
|
||||
const application = ApplicationStore.getApplication(id);
|
||||
const applicationFlagUtilsModule = require(7504) /* metro dependency 7504: ApplicationFlagUtils */;
|
||||
const hasApplicationFlag = applicationFlagUtilsModule.hasApplicationFlag;
|
||||
const EMBEDDED_FIRST_PARTY = ApplicationFlags.EMBEDDED_FIRST_PARTY;
|
||||
if (Reflect.apply(hasApplicationFlag, applicationFlagUtilsModule, [application, EMBEDDED_FIRST_PARTY])) {
|
||||
activeAnalyticsSessionIDs = (require(8097) /* metro dependency 8097: EmbeddedActivitiesManager */).getActiveAnalyticsSessionIDs(id);
|
||||
object3 = {activity_application_id: id};
|
||||
object3.activity_channel_type = value3?.type;
|
||||
object3.activity_guild_id = guildId;
|
||||
object3.activity_user_session_id = activeAnalyticsSessionIDs?.activityUserSessionId;
|
||||
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = value.track;
|
||||
object4 = {};
|
||||
copyDataProperties(object4, object3, application);
|
||||
copyDataProperties(object4, event_properties, application);
|
||||
Reflect.apply(track, value, [event_name, object4]);
|
||||
return undefined;
|
||||
}
|
||||
const defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
const INVALID_COMMAND = RPCErrors.INVALID_COMMAND;
|
||||
throw new defaultImport({errorCode: INVALID_COMMAND}, 'This application cannot access this API');
|
||||
}
|
||||
|
||||
function handler_99375({socket}) { // fn#99375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13207:1013, offset: 0x021c60df, size: 234 bytes, params: 2, frame: 18
|
||||
const id = socket.application.id;
|
||||
if (id == null) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_COMMAND},
|
||||
'No application.');
|
||||
}
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
const post = HTTP.post;
|
||||
const object3 = {'url': null, 'body': null, 'retries': 3, 'oldFormErrors': true, 'rejectWithError': false};
|
||||
object3.url = Endpoints.APPLICATION_TICKET(id);
|
||||
const object4 = {};
|
||||
object4.test_mode = (require(7502) /* metro dependency 7502: TestModeUtils */).isTestModeForApplication(id);
|
||||
object3.body = object4;
|
||||
return Reflect.apply(post, HTTP, [object3]).then(function(a0) {
|
||||
return a0.body;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/* Metro module 13019; source: modules/rpc/server/commands/certifiedDevices.tsx; dependencies: [4135, 661, 4291, 4122, 8079, 8076, 13020, 2] */
|
||||
function _fun99379(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13209:6, offset: 0x021c6264, size: 262 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(4135) /* metro dependency 4135: Constants */;
|
||||
const RPC_LOCAL_SCOPE = value.RPC_LOCAL_SCOPE;
|
||||
const RPC_SCOPE_CONFIG = value.RPC_SCOPE_CONFIG;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const env0_3 = value.RPCErrors;
|
||||
const env0_4 = (require(4291) /* metro dependency 4291: Constants */).DeviceTypes;
|
||||
object2 = {};
|
||||
const SET_CERTIFIED_DEVICES = RPCCommands.SET_CERTIFIED_DEVICES;
|
||||
const ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
const RPC = OAuth2Scopes.RPC;
|
||||
object2[SET_CERTIFIED_DEVICES] = {scope: {[ANY]: [RPC, RPC_LOCAL_SCOPE]}, validation: validation_99380,
|
||||
handler: handler_99381};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/certifiedDevices.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validation_99380(a0) { // fn#99380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13209:295, offset: 0x021c636a, size: 496 bytes, params: 2, frame: 27
|
||||
const value3 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0).required();
|
||||
const keys = value3.keys;
|
||||
const value4 = a0.array();
|
||||
const items2 = value4.items;
|
||||
const value5 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
const keys2 = value5.keys;
|
||||
const object = {};
|
||||
const value7 = a0.string().required();
|
||||
const valid = value7.valid;
|
||||
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
|
||||
const AUDIO_OUTPUT = DeviceTypes.AUDIO_OUTPUT;
|
||||
const VIDEO_INPUT = DeviceTypes.VIDEO_INPUT;
|
||||
object.type = Reflect.apply(valid, value7, [[AUDIO_INPUT, AUDIO_OUTPUT, VIDEO_INPUT]]);
|
||||
let value = a0.string();
|
||||
value = value.required();
|
||||
object.id = value.min(1);
|
||||
value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys3 = value.keys;
|
||||
const object5 = {};
|
||||
object5.name = a0.string().min(1);
|
||||
object5.url = a0.string().min(1);
|
||||
object.vendor = Reflect.apply(keys3, value, [object5]);
|
||||
value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys4 = value.keys;
|
||||
const object6 = {};
|
||||
object6.name = a0.string().min(1);
|
||||
object6.url = a0.string().min(1);
|
||||
object.model = Reflect.apply(keys4, value, [object6]);
|
||||
value = a0.array();
|
||||
const items3 = value.items;
|
||||
const value12 = a0.string();
|
||||
object.related = Reflect.apply(items3, value, [value12.min(1)]);
|
||||
object.echo_cancellation = a0.boolean();
|
||||
object.noise_suppression = a0.boolean();
|
||||
object.automatic_gain_control = a0.boolean();
|
||||
object.hardware_mute = a0.boolean();
|
||||
return Reflect.apply(keys, value3, [{devices: Reflect.apply(items2, value4, [Reflect.apply(keys2, value5,
|
||||
[object])])}]);
|
||||
}
|
||||
|
||||
function handler_99381({socket, args}) { // fn#99381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13209:810, offset: 0x021c655a, size: 182 bytes, params: 2, frame: 16
|
||||
const devices = args.devices;
|
||||
if (socket.application.id == null) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_COMMAND},
|
||||
'No application.');
|
||||
}
|
||||
const value = require(13020) /* metro dependency 13020: CertifiedDeviceActionCreators */;
|
||||
value.setCertifiedDevices(socket.application.id, devices.map(function(a0) {
|
||||
var object = {type: a0.type, id: a0.id, vendor: a0.vendor, model: a0.model};
|
||||
object.related = a0.related.filter(_fun99383);
|
||||
object.echoCancellation = a0.echo_cancellation;
|
||||
object.noiseSuppression = a0.noise_suppression;
|
||||
object.automaticGainControl = a0.automatic_gain_control;
|
||||
object.hardwareMute = a0.hardware_mute;
|
||||
return object;
|
||||
}));
|
||||
}
|
||||
|
||||
function _fun99382({type, id, vendor, model, related, echo_cancellation, noise_suppression, automatic_gain_control, hardware_mute}) { // fn#99382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13209:993, offset: 0x021c6610, size: 121 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
object2.type = type;
|
||||
object2.id = id;
|
||||
object2.vendor = vendor;
|
||||
object2.model = model;
|
||||
object2.related = related.filter(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return devices.some(_fun99384);
|
||||
});
|
||||
object2.echoCancellation = echo_cancellation;
|
||||
object2.noiseSuppression = noise_suppression;
|
||||
object2.automaticGainControl = automatic_gain_control;
|
||||
object2.hardwareMute = hardware_mute;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun99383(a0) { // fn#99383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13209:1074, offset: 0x021c6689, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return devices.some(_fun99384);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,515 @@
|
||||
/* Metro module 13021; source: modules/rpc/server/commands/channels.tsx; dependencies: [1383, 1379, 1867, 3784, 1934, 4297, 4135, 661, 4122, 8076, 8081, 22, 13018, 8079, 4796, 4800, 1230, 8879, 2] */
|
||||
function _fun99387(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:6, offset: 0x021c674d, size: 822 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1383) /* metro dependency 1383: ChannelRecord */;
|
||||
const env0_3 = value.isVoiceChannel;
|
||||
const env0_4 = value.isTextChannel;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
||||
const RPC_SCOPE_CONFIG = (require(4135) /* metro dependency 4135: Constants */).RPC_SCOPE_CONFIG;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = value.Routes;
|
||||
const env0_11 = value.Permissions;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const env0_12 = value.RPCErrors;
|
||||
object2 = {};
|
||||
const GET_CHANNEL = RPCCommands.GET_CHANNEL;
|
||||
let ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
let RPC = OAuth2Scopes.RPC;
|
||||
const GUILDS = OAuth2Scopes.GUILDS;
|
||||
let GUILDS_CHANNELS_READ = OAuth2Scopes.GUILDS_CHANNELS_READ;
|
||||
object2[GET_CHANNEL] = {scope: {[ANY]: [RPC, GUILDS, GUILDS_CHANNELS_READ]}, handler: handler_99388};
|
||||
const GET_CHANNELS = RPCCommands.GET_CHANNELS;
|
||||
RPC = OAuth2Scopes.RPC;
|
||||
object2[GET_CHANNELS] = {scope: RPC, handler: handler_99389};
|
||||
const GET_CHANNEL_PERMISSIONS = RPCCommands.GET_CHANNEL_PERMISSIONS;
|
||||
ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
const GUILDS_MEMBERS_READ = OAuth2Scopes.GUILDS_MEMBERS_READ;
|
||||
GUILDS_CHANNELS_READ = OAuth2Scopes.GUILDS_CHANNELS_READ;
|
||||
object2[GET_CHANNEL_PERMISSIONS] = {scope: {[ANY]: [GUILDS_MEMBERS_READ, GUILDS_CHANNELS_READ]},
|
||||
handler: handler_99393};
|
||||
const SELECT_VOICE_CHANNEL = RPCCommands.SELECT_VOICE_CHANNEL;
|
||||
RPC = OAuth2Scopes.RPC;
|
||||
object2[SELECT_VOICE_CHANNEL] = {scope: RPC, validation: validation_99394, handler: handler_99395};
|
||||
const GET_SELECTED_VOICE_CHANNEL = RPCCommands.GET_SELECTED_VOICE_CHANNEL;
|
||||
ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
RPC = OAuth2Scopes.RPC;
|
||||
const RPC_VOICE_READ = OAuth2Scopes.RPC_VOICE_READ;
|
||||
object2[GET_SELECTED_VOICE_CHANNEL] = {scope: {[ANY]: [RPC, RPC_VOICE_READ]}, handler: handler_99400};
|
||||
const SELECT_TEXT_CHANNEL = RPCCommands.SELECT_TEXT_CHANNEL;
|
||||
RPC = OAuth2Scopes.RPC;
|
||||
object2[SELECT_TEXT_CHANNEL] = {scope: RPC, validation: validation_99401, handler: handler_99402};
|
||||
const CREATE_CHANNEL_INVITE = RPCCommands.CREATE_CHANNEL_INVITE;
|
||||
RPC = OAuth2Scopes.RPC;
|
||||
object2[CREATE_CHANNEL_INVITE] = {scope: RPC, handler: function({args}) {
|
||||
var channel_id = args.channel_id;
|
||||
var env0_0 = channel_id;
|
||||
var value = Object.create(null);
|
||||
value.channel_id = 0;
|
||||
value = copyDataProperties({}, args, value, channel_id);
|
||||
value = importDefault(dependencyMap[17]).createInvite(channel_id, value, 'RPC');
|
||||
return value.catch(_fun99408);
|
||||
}};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/channels.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function handler_99388({args, socket}) { // fn#99388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:420, offset: 0x021c6a83, size: 399 bytes, params: 2, frame: 20
|
||||
var scopes;
|
||||
var includes;
|
||||
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
var transformChannel;
|
||||
var moduleValue;
|
||||
var defaultImport2;
|
||||
const channel_id = args.channel_id;
|
||||
var value;
|
||||
const channel = ChannelStore.getChannel(channel_id);
|
||||
if (channel == null) {
|
||||
defaultImport2 = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_CHANNEL;
|
||||
value = 'Invalid channel id: ' + channel_id;
|
||||
value = new defaultImport2();
|
||||
throw value;
|
||||
}
|
||||
if (channel.isPrivate()) {
|
||||
scopes = socket.authorization.scopes;
|
||||
includes = scopes.includes;
|
||||
if (Reflect.apply(includes, scopes, [OAuth2Scopes.RPC])) {
|
||||
value = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
transformChannel = value.transformChannel;
|
||||
moduleValue = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
return Reflect.apply(transformChannel, value, [channel, moduleValue.hasMessageReadPermission(channel,
|
||||
socket.application.id, socket.authorization.scopes)]);
|
||||
}
|
||||
includes = scopes.includes;
|
||||
if (Reflect.apply(includes, scopes, [OAuth2Scopes.DM_CHANNELS_READ])) {
|
||||
value = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
transformChannel = value.transformChannel;
|
||||
moduleValue = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
return Reflect.apply(transformChannel, value, [channel, moduleValue.hasMessageReadPermission(channel,
|
||||
socket.application.id, socket.authorization.scopes)]);
|
||||
}
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_PERMISSIONS},
|
||||
|
||||
'Invalid scope');
|
||||
}
|
||||
value = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
transformChannel = value.transformChannel;
|
||||
moduleValue = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
return Reflect.apply(transformChannel, value, [channel, moduleValue.hasMessageReadPermission(channel,
|
||||
socket.application.id, socket.authorization.scopes)]);
|
||||
}
|
||||
|
||||
function handler_99389({args}) { // fn#99389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:944, offset: 0x021c6c12, size: 246 bytes, params: 2, frame: 17
|
||||
var r7;
|
||||
var object2;
|
||||
var defaultImport2;
|
||||
const guild_id = args.guild_id;
|
||||
var value;
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
const value2 = defaultImport.values(ChannelStore.loadAllGuildAndPrivateChannelsFromDisk());
|
||||
if (guild_id) {
|
||||
if (GuildStore.getGuild(guild_id) == null) {
|
||||
defaultImport2 = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_GUILD;
|
||||
value = 'Invalid guild id: ' + guild_id;
|
||||
value = new defaultImport2();
|
||||
throw value;
|
||||
}
|
||||
value = value2.filter(_fun99390);
|
||||
r7 = value;
|
||||
object2 = {};
|
||||
value = r7.filter(function(a0) {
|
||||
return PermissionStore.can(Permissions.VIEW_CHANNEL, a0);
|
||||
});
|
||||
object2.channels = value.map(_fun99392);
|
||||
} else {
|
||||
r7 = value2;
|
||||
object2 = {};
|
||||
object2.channels = r7.filter(function(a0) {
|
||||
return PermissionStore.can(Permissions.VIEW_CHANNEL, a0);
|
||||
}).map(function({id, name, type}) {
|
||||
return {id: id, name: name, type: type};
|
||||
});
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function handler_99393() { // fn#99393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:1430, offset: 0x021c6d66, size: 127 bytes, params: 1, frame: 15
|
||||
const value2 = (importDefault(13018) /* metro dependency 13018: getCurrentEmbeddedActivityChannel */)();
|
||||
if (value2 == null) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_CHANNEL},
|
||||
'Invalid channel');
|
||||
}
|
||||
const object2 = {};
|
||||
object2.permissions = PermissionStore.computePermissions(value2);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function validation_99394(a0) { // fn#99394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:1650, offset: 0x021c6de5, size: 153 bytes, params: 2, frame: 15
|
||||
let value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys = value.keys;
|
||||
const object2 = {};
|
||||
object2.channel_id = a0.string().allow(null);
|
||||
object2.timeout = a0.number().min(0).max(60);
|
||||
object2.force = a0.boolean();
|
||||
object2.navigate = a0.boolean();
|
||||
return Reflect.apply(keys, value, [object2]);
|
||||
}
|
||||
|
||||
function handler_99395({server, socket, args}) { // fn#99395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:1791, offset: 0x021c6e7e, size: 291 bytes, params: 2, frame: 21
|
||||
var value;
|
||||
var voiceChannelId;
|
||||
const channel_id = args.channel_id;
|
||||
let timeout = args.timeout;
|
||||
timeout = timeout === undefined ? 0 : timeout;
|
||||
let force = args.force;
|
||||
force = !(force === undefined) && force;
|
||||
if (args.navigate !== undefined) {
|
||||
}
|
||||
if (channel_id) {
|
||||
voiceChannelId = SelectedChannelStore.getVoiceChannelId();
|
||||
if (voiceChannelId == null) {
|
||||
value = server.storeWait(socket, function() {
|
||||
return ChannelStore.getChannel(channel_id);
|
||||
}, timeout);
|
||||
value = value.catch(_fun99397);
|
||||
value = value.then(_fun99398);
|
||||
return value.then(_fun99399);
|
||||
}
|
||||
if (voiceChannelId === channel_id) {
|
||||
value = server.storeWait(socket, _fun99396, timeout);
|
||||
value = value.catch(_fun99397);
|
||||
value = value.then(_fun99398);
|
||||
return value.then(_fun99399);
|
||||
}
|
||||
if (force === false) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.SELECT_VOICE_FORCE_REQUIRED},
|
||||
|
||||
|
||||
'User is already joined to a voice channel.');
|
||||
}
|
||||
value = server.storeWait(socket, _fun99396, timeout);
|
||||
value = value.catch(_fun99397);
|
||||
value = value.then(_fun99398);
|
||||
return value.then(_fun99399);
|
||||
}
|
||||
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).selectVoiceChannel(null);
|
||||
return null;
|
||||
}
|
||||
|
||||
function handler_99400({socket}) { // fn#99400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:3066, offset: 0x021c72c3, size: 140 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var transformChannel;
|
||||
var moduleValue;
|
||||
var value;
|
||||
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
|
||||
const r4 = voiceChannelId != null ? ChannelStore.getChannel(voiceChannelId) : null;
|
||||
if (r4 != null) {
|
||||
value = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
transformChannel = value.transformChannel;
|
||||
moduleValue = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
value = Reflect.apply(transformChannel, value, [r4, moduleValue.hasMessageReadPermission(r4,
|
||||
socket.application.id,
|
||||
socket.authorization.scopes)]);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function validation_99401(a0) { // fn#99401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:3340, offset: 0x021c734f, size: 123 bytes, params: 2, frame: 15
|
||||
let value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys = value.keys;
|
||||
const object2 = {};
|
||||
object2.channel_id = a0.string().allow(null);
|
||||
object2.timeout = a0.number().min(0).max(60);
|
||||
return Reflect.apply(keys, value, [object2]);
|
||||
}
|
||||
|
||||
function handler_99402({server, socket, args}) { // fn#99402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:3450, offset: 0x021c73ca, size: 175 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var value;
|
||||
var moduleValue;
|
||||
const channel_id = args.channel_id;
|
||||
let timeout = args.timeout;
|
||||
timeout = timeout === undefined ? 0 : timeout;
|
||||
if (channel_id) {
|
||||
value = server.storeWait(socket, function() {
|
||||
return ChannelStore.getChannel(channel_id);
|
||||
}, timeout);
|
||||
value = value.catch(_fun99404);
|
||||
value = value.then(_fun99405);
|
||||
value = value.then(_fun99406);
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
|
||||
moduleValue.transitionTo(Routes.ME);
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function handler_99407({args}) { // fn#99407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:4355, offset: 0x021c7725, size: 105 bytes, params: 2, frame: 16
|
||||
const channel_id = args.channel_id;
|
||||
let value = Object.create(null);
|
||||
value.channel_id = 0;
|
||||
value = copyDataProperties({}, args, value, channel_id);
|
||||
value = (importDefault(8879) /* metro dependency 8879: InstantInviteActionCreators */).createInvite(channel_id,
|
||||
value, 'RPC');
|
||||
return value.catch(_fun99408);
|
||||
}
|
||||
|
||||
function _fun99390({guild_id}) { // fn#99390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:1161, offset: 0x021c6d08, size: 26 bytes, params: 2, frame: 2
|
||||
return guild_id === env0_0.id;
|
||||
}
|
||||
|
||||
function _fun99392({id, name, type}) { // fn#99392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:1248, offset: 0x021c6d44, size: 34 bytes, params: 2, frame: 4
|
||||
return {id: id, name: name, type: type};
|
||||
}
|
||||
|
||||
function _fun99397() { // fn#99397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:2143, offset: 0x021c6fa1, size: 73 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
const SELECT_CHANNEL_TIMED_OUT = RPCErrors.SELECT_CHANNEL_TIMED_OUT;
|
||||
throw new defaultImport({errorCode: SELECT_CHANNEL_TIMED_OUT}, 'Request to select voice channel timed out.');
|
||||
}
|
||||
|
||||
function _fun99398(a0) { // fn#99398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:2261, offset: 0x021c6fea, size: 332 bytes, params: 2, frame: 20
|
||||
var value;
|
||||
var items;
|
||||
var Promise;
|
||||
var all;
|
||||
var transformChannel;
|
||||
var moduleValue;
|
||||
var hasMessageReadPermission;
|
||||
var socketBinding;
|
||||
var defaultImport2;
|
||||
if (a0 == null) {
|
||||
value = environment.__proto__;
|
||||
defaultImport2 = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_CHANNEL;
|
||||
value = 'Invalid channel id: ' + channel_id;
|
||||
value = new defaultImport2();
|
||||
throw value;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
if (isVoiceChannel(a0.type)) {
|
||||
Promise = global.Promise;
|
||||
all = Promise.all;
|
||||
items = [global.Promise.resolve(a0)];
|
||||
value = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
transformChannel = value.transformChannel;
|
||||
moduleValue = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
hasMessageReadPermission = moduleValue.hasMessageReadPermission;
|
||||
socketBinding = socket;
|
||||
items[1] = Reflect.apply(transformChannel, value, [a0, Reflect.apply(hasMessageReadPermission, moduleValue, [a0,
|
||||
socketBinding.application.id, socketBinding.authorization.scopes])]);
|
||||
return Reflect.apply(all, Promise, [items]);
|
||||
}
|
||||
const defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
const INVALID_CHANNEL = RPCErrors.INVALID_CHANNEL;
|
||||
throw new defaultImport({errorCode: INVALID_CHANNEL}, 'Channel is not a voice channel');
|
||||
}
|
||||
|
||||
function _fun99399(a0) { // fn#99399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:2606, offset: 0x021c7136, size: 397 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var r1;
|
||||
var r4;
|
||||
var item3;
|
||||
var value3;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var value6;
|
||||
var defaultImport;
|
||||
const iterator = a0[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
let value = undefined;
|
||||
const value2 = item2 === value;
|
||||
const r2 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r1 = value;
|
||||
r4 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r1 = value;
|
||||
r4 = value3;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = item;
|
||||
r4 = value3;
|
||||
}
|
||||
}
|
||||
if (!r4) {
|
||||
r0.return();
|
||||
}
|
||||
if (r1.guild_id) {
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = require(4800) /* metro dependency 4800: ChannelUtils */;
|
||||
if (moduleValue.isChannelFull(r2, VoiceStateStore, GuildStore)) {
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
value = new value({errorCode: RPCErrors.INVALID_CHANNEL}, 'Channel is full');
|
||||
throw value;
|
||||
}
|
||||
if (PermissionStore.can(Permissions.CONNECT, r2)) {
|
||||
value6 = environment.__proto__;
|
||||
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
|
||||
defaultImport.selectVoiceChannel(r2.id);
|
||||
if (navigate) {
|
||||
value = require(1230) /* metro dependency 1230: router_utils */;
|
||||
value.replaceWith(Routes.CHANNEL(r2.guild_id, r2.id));
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
value = new value({errorCode: RPCErrors.INVALID_PERMISSIONS}, 'Connect permission required to join channel');
|
||||
throw value;
|
||||
}
|
||||
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
|
||||
defaultImport.selectVoiceChannel(r2.id);
|
||||
if (navigate) {
|
||||
value = require(1230) /* metro dependency 1230: router_utils */;
|
||||
value.replaceWith(Routes.CHANNEL(r2.guild_id, r2.id));
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function _fun99404() { // fn#99404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:3553, offset: 0x021c7479, size: 73 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
const SELECT_CHANNEL_TIMED_OUT = RPCErrors.SELECT_CHANNEL_TIMED_OUT;
|
||||
throw new defaultImport({errorCode: SELECT_CHANNEL_TIMED_OUT}, 'Request to select text channel timed out.');
|
||||
}
|
||||
|
||||
function _fun99405(a0) { // fn#99405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:3670, offset: 0x021c74c2, size: 332 bytes, params: 2, frame: 20
|
||||
var value;
|
||||
var items;
|
||||
var Promise;
|
||||
var all;
|
||||
var transformChannel;
|
||||
var moduleValue;
|
||||
var hasMessageReadPermission;
|
||||
var socketBinding;
|
||||
var defaultImport2;
|
||||
if (a0 == null) {
|
||||
value = environment.__proto__;
|
||||
defaultImport2 = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_CHANNEL;
|
||||
value = 'Invalid channel id: ' + channel_id;
|
||||
value = new defaultImport2();
|
||||
throw value;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
if (isTextChannel(a0.type)) {
|
||||
Promise = global.Promise;
|
||||
all = Promise.all;
|
||||
items = [global.Promise.resolve(a0)];
|
||||
value = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
transformChannel = value.transformChannel;
|
||||
moduleValue = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
hasMessageReadPermission = moduleValue.hasMessageReadPermission;
|
||||
socketBinding = socket;
|
||||
items[1] = Reflect.apply(transformChannel, value, [a0, Reflect.apply(hasMessageReadPermission, moduleValue, [a0,
|
||||
socketBinding.application.id, socketBinding.authorization.scopes])]);
|
||||
return Reflect.apply(all, Promise, [items]);
|
||||
}
|
||||
const defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
const INVALID_CHANNEL = RPCErrors.INVALID_CHANNEL;
|
||||
throw new defaultImport({errorCode: INVALID_CHANNEL}, 'Channel is not a text channel');
|
||||
}
|
||||
|
||||
function _fun99406(a0) { // fn#99406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:4014, offset: 0x021c760e, size: 279 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var r2;
|
||||
var r3;
|
||||
var item3;
|
||||
var value3;
|
||||
var value4;
|
||||
var value6;
|
||||
const iterator = a0[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
let value = undefined;
|
||||
const value2 = item2 === value;
|
||||
const r1 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = value;
|
||||
r2 = item2;
|
||||
r3 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = value;
|
||||
r2 = item3;
|
||||
r3 = value3;
|
||||
} else {
|
||||
r0 = item;
|
||||
r2 = item3;
|
||||
r3 = value3;
|
||||
}
|
||||
}
|
||||
if (!r3) {
|
||||
r2.return();
|
||||
}
|
||||
let guild_id = r0.guild_id;
|
||||
if (guild_id) {
|
||||
value4 = environment.__proto__;
|
||||
if (PermissionStore.can(Permissions.VIEW_CHANNEL, r1)) {
|
||||
guild_id = r0.guild_id;
|
||||
value6 = environment.__proto__;
|
||||
if (guild_id) {
|
||||
value = require(1230) /* metro dependency 1230: router_utils */;
|
||||
value.replaceWith(Routes.CHANNEL(r0.guild_id, r1.id));
|
||||
} else {
|
||||
value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
|
||||
value.selectPrivateChannel(r1.id);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
value = new value({errorCode: RPCErrors.INVALID_CHANNEL}, 'No permission to see channel');
|
||||
throw value;
|
||||
}
|
||||
if (r0.guild_id) {
|
||||
value = require(1230) /* metro dependency 1230: router_utils */;
|
||||
value.replaceWith(Routes.CHANNEL(r0.guild_id, r1.id));
|
||||
} else {
|
||||
value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
|
||||
value.selectPrivateChannel(r1.id);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun99408() { // fn#99408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13211:4425, offset: 0x021c778e, size: 105 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
const INVALID_PERMISSIONS = RPCErrors.INVALID_PERMISSIONS;
|
||||
value = 'Unable to generate an invite for ' + channel_id + '. Does this user have permissions?';
|
||||
value = new defaultImport({errorCode: INVALID_PERMISSIONS}, value);
|
||||
throw value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Metro module 13022; source: modules/rpc/server/commands/config.tsx; dependencies: [4135, 661, 8079, 8076, 694, 2] */
|
||||
function _fun99409(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13212:6, offset: 0x021c77f7, size: 191 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(4135) /* metro dependency 4135: Constants */;
|
||||
const env0_2 = value.TransportTypes;
|
||||
const RPC_AUTHENTICATED_SCOPE = value.RPC_AUTHENTICATED_SCOPE;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const env0_3 = value.RPCErrors;
|
||||
object2 = {};
|
||||
const SET_CONFIG = RPCCommands.SET_CONFIG;
|
||||
object2[SET_CONFIG] = {scope: RPC_AUTHENTICATED_SCOPE, validation: validation_99410, handler: handler_99411};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/config.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validation_99410(a0) { // fn#99410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13212:231, offset: 0x021c78b6, size: 72 bytes, params: 2, frame: 13
|
||||
let value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys = value.keys;
|
||||
const object2 = {};
|
||||
object2.use_interactive_pip = a0.boolean();
|
||||
return Reflect.apply(keys, value, [object2]);
|
||||
}
|
||||
|
||||
function handler_99411({socket, args}) { // fn#99411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13212:296, offset: 0x021c78fe, size: 333 bytes, params: 2, frame: 17
|
||||
var defaultImport2;
|
||||
const use_interactive_pip = args.use_interactive_pip;
|
||||
const transport = socket.transport;
|
||||
var value;
|
||||
const POST_MESSAGE = TransportTypes.POST_MESSAGE;
|
||||
if (transport !== POST_MESSAGE) {
|
||||
defaultImport2 = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_COMMAND;
|
||||
value = 'command not available from "' + socket.transport + ' transport';
|
||||
value = new defaultImport2();
|
||||
throw value;
|
||||
}
|
||||
if (socket.application.id == null) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_COMMAND},
|
||||
'invalid application');
|
||||
}
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMBEDDED_ACTIVITY_SET_CONFIG',
|
||||
applicationId: socket.application.id, config: {useInteractivePIP: use_interactive_pip}});
|
||||
const Promise = global.Promise;
|
||||
return Promise.resolve({use_interactive_pip: use_interactive_pip});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 13016; source: modules/rpc/server/commands/crossPlatformRPCCommands.tsx; dependencies: [13017, 13019, 13021, 13022, 13023, 13024, 13025, 13030, 13036, 13037, 13038, 13039, 13040, 13041, 13042, 13049, 13052, 13053, 13054, 13055, 13056, 13057, 2] */
|
||||
function _fun99371(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13206:6, offset: 0x021c5be6, size: 501 bytes, params: 8, frame: 17
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {};
|
||||
copyDataProperties(object2, importDefault(13017) /* metro dependency 13017: application */, undefined);
|
||||
copyDataProperties(object2, importDefault(13019) /* metro dependency 13019: certifiedDevices */, undefined);
|
||||
copyDataProperties(object2, importDefault(13021) /* metro dependency 13021: channels */, undefined);
|
||||
copyDataProperties(object2, importDefault(13022) /* metro dependency 13022: config */, undefined);
|
||||
copyDataProperties(object2, importDefault(13023) /* metro dependency 13023: guilds */, undefined);
|
||||
copyDataProperties(object2, importDefault(13024) /* metro dependency 13024: images */, undefined);
|
||||
copyDataProperties(object2, importDefault(13025) /* metro dependency 13025: invites */, undefined);
|
||||
copyDataProperties(object2, importDefault(13030) /* metro dependency 13030: links */, undefined);
|
||||
copyDataProperties(object2, importDefault(13036) /* metro dependency 13036: logs */, undefined);
|
||||
copyDataProperties(object2, importDefault(13037) /* metro dependency 13037: networking */, undefined);
|
||||
copyDataProperties(object2, importDefault(13038) /* metro dependency 13038: providers */, undefined);
|
||||
copyDataProperties(object2, importDefault(13039) /* metro dependency 13039: relationships */, undefined);
|
||||
copyDataProperties(object2, importDefault(13040) /* metro dependency 13040: setActivity */, undefined);
|
||||
copyDataProperties(object2, importDefault(13041) /* metro dependency 13041: setOrientationLockState */, undefined);
|
||||
copyDataProperties(object2, importDefault(13042) /* metro dependency 13042: store */, undefined);
|
||||
copyDataProperties(object2, importDefault(13049) /* metro dependency 13049: subscriptions */, undefined);
|
||||
copyDataProperties(object2, importDefault(13052) /* metro dependency 13052: users */, undefined);
|
||||
copyDataProperties(object2, importDefault(13053) /* metro dependency 13053: userSettings */, undefined);
|
||||
copyDataProperties(object2, importDefault(13054) /* metro dependency 13054: platformBehaviors */, undefined);
|
||||
copyDataProperties(object2, importDefault(13055) /* metro dependency 13055: soundboard */, undefined);
|
||||
copyDataProperties(object2, importDefault(13056) /* metro dependency 13056: activities */, undefined);
|
||||
copyDataProperties(object2, importDefault(13057) /* metro dependency 13057: quests */, undefined);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/crossPlatformRPCCommands.tsx');
|
||||
exports.crossPlatformCommands = object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/* Metro module 13023; source: modules/rpc/server/commands/guilds.tsx; dependencies: [1422, 1867, 661, 4122, 8079, 8076, 2] */
|
||||
function _fun99412(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13213:6, offset: 0x021c7a4b, size: 276 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(1422) /* metro dependency 1422: GuildRecord */).getGuildIconURL;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const RPCCommands = constantsModule.RPCCommands;
|
||||
const env0_4 = constantsModule.RPCErrors;
|
||||
object2 = {};
|
||||
const GET_GUILD = RPCCommands.GET_GUILD;
|
||||
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
let RPC = OAuth2Scopes.RPC;
|
||||
object2[GET_GUILD] = {scope: RPC, validation: validation_99413, handler: function({socket, server, args}) {
|
||||
var value;
|
||||
var env0_0 = args.guild_id;
|
||||
var timeout = args.timeout;
|
||||
value = server.storeWait(socket, _fun99415, timeout !== undefined ? timeout : 0);
|
||||
value = value.catch(_fun99416);
|
||||
return value.then(_fun99417);
|
||||
}};
|
||||
const GET_GUILDS = RPCCommands.GET_GUILDS;
|
||||
RPC = OAuth2Scopes.RPC;
|
||||
object2[GET_GUILDS] = {scope: RPC, handler: handler_99418};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/guilds.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validation_99413(a0) { // fn#99413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13213:232, offset: 0x021c7b5f, size: 110 bytes, params: 2, frame: 14
|
||||
let value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys = value.keys;
|
||||
const object2 = {};
|
||||
object2.guild_id = a0.string();
|
||||
object2.timeout = a0.number().min(0).max(60);
|
||||
return Reflect.apply(keys, value, [object2]);
|
||||
}
|
||||
|
||||
function handler_99414({socket, server, args}) { // fn#99414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13213:327, offset: 0x021c7bcd, size: 103 bytes, params: 2, frame: 16
|
||||
const env0_0 = args.guild_id;
|
||||
let timeout = args.timeout;
|
||||
timeout = timeout === undefined ? 0 : timeout;
|
||||
let value = server.storeWait(socket, function() {
|
||||
return GuildStore.getGuild(guild_id);
|
||||
}, timeout);
|
||||
value = value.catch(_fun99416);
|
||||
return value.then(_fun99417);
|
||||
}
|
||||
|
||||
function handler_99418() { // fn#99418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13213:785, offset: 0x021c7d35, size: 45 bytes, params: 1, frame: 12
|
||||
const object2 = {};
|
||||
object2.guilds = GuildStore.getGuildsArray().map(_fun99419);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun99416() { // fn#99416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13213:424, offset: 0x021c7c34, size: 73 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
const GET_GUILD_TIMED_OUT = RPCErrors.GET_GUILD_TIMED_OUT;
|
||||
throw new defaultImport({errorCode: GET_GUILD_TIMED_OUT}, 'Request to get guild timed out.');
|
||||
}
|
||||
|
||||
function _fun99417(a0) { // fn#99417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13213:526, offset: 0x021c7c7d, size: 184 bytes, params: 2, frame: 15
|
||||
var defaultImport;
|
||||
let value = null;
|
||||
if (value == a0) {
|
||||
value = environment.__proto__;
|
||||
defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
value = 'Invalid guild id: ' + guild_id;
|
||||
value = new defaultImport({errorCode: RPCErrors.INVALID_GUILD}, value);
|
||||
throw value;
|
||||
}
|
||||
const object2 = {};
|
||||
object2.id = a0.id;
|
||||
object2.name = a0.name;
|
||||
const guildIconURL = getGuildIconURL(a0, 128);
|
||||
object2.icon_url = value != guildIconURL ? guildIconURL : value;
|
||||
object2.members = [];
|
||||
object2.vanity_url_code = a0.vanityURLCode;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun99419(a0) { // fn#99419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13213:822, offset: 0x021c7d62, size: 60 bytes, params: 2, frame: 14
|
||||
const object2 = {};
|
||||
object2.id = a0.id;
|
||||
object2.name = a0.name;
|
||||
let value = environment.__proto__;
|
||||
value = getGuildIconURL(a0, 128);
|
||||
const value2 = null;
|
||||
object2.icon_url = value2 != value ? value : value2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/* Metro module 13024; source: modules/rpc/server/commands/images.tsx; dependencies: [1878, 4135, 661, 8079, 1423, 8076, 1475, 2] */
|
||||
function _fun99420(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13214:6, offset: 0x021c7d9e, size: 201 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const RPC_LOCAL_SCOPE = (require(4135) /* metro dependency 4135: Constants */).RPC_LOCAL_SCOPE;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const RPCCommands = constantsModule.RPCCommands;
|
||||
const env0_4 = constantsModule.RPCErrors;
|
||||
object2 = {};
|
||||
const GET_IMAGE = RPCCommands.GET_IMAGE;
|
||||
object2[GET_IMAGE] = {scope: RPC_LOCAL_SCOPE, validation: validation_99421, handler: handler_99422};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/images.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validation_99421(a0) { // fn#99421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13214:212, offset: 0x021c7e67, size: 213 bytes, params: 2, frame: 15
|
||||
let value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys = value.keys;
|
||||
const object2 = {};
|
||||
object2.type = a0.string().required().valid(['user']);
|
||||
object2.id = a0.string().required();
|
||||
object2.format = a0.string().required().valid(['png', 'webp', 'jpg']);
|
||||
object2.size = a0.number().required().valid([16, 32, 64, 128, 256, 512, 1024]);
|
||||
return Reflect.apply(keys, value, [object2]);
|
||||
}
|
||||
|
||||
function handler_99422({args}) { // fn#99422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13214:432, offset: 0x021c7f3c, size: 425 bytes, params: 2, frame: 23
|
||||
var r5;
|
||||
var value13;
|
||||
const type = args.type;
|
||||
const id = args.id;
|
||||
let format = args.format;
|
||||
let value = undefined;
|
||||
format = format === value ? 'png' : format;
|
||||
let size = args.size;
|
||||
size = size === value ? 128 : size;
|
||||
if (type !== 'user') {
|
||||
r5 = value;
|
||||
if (r5 == null) {
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
value = new value({errorCode: RPCErrors.INVALID_COMMAND}, 'No valid type.');
|
||||
throw value;
|
||||
}
|
||||
value = global.fetch(r5);
|
||||
value = value.then(function(a0) {
|
||||
return a0.blob();
|
||||
});
|
||||
value = value.then(_fun99424);
|
||||
return value.then(_fun99425);
|
||||
}
|
||||
const user = UserStore.getUser(id);
|
||||
if (user == null) {
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_USER;
|
||||
value13 = 'Invalid user id: ' + id;
|
||||
value = new value();
|
||||
throw value;
|
||||
}
|
||||
const userAvatarURL = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarURL(user, false,
|
||||
size, format);
|
||||
const GLOBAL_ENV = global.window.GLOBAL_ENV;
|
||||
const CDN_HOST = GLOBAL_ENV.CDN_HOST;
|
||||
r5 = CDN_HOST != null && userAvatarURL.indexOf(CDN_HOST) !== -1 ? userAvatarURL + '&_=' : userAvatarURL;
|
||||
if (r5 == null) {
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
value = new value({errorCode: RPCErrors.INVALID_COMMAND}, 'No valid type.');
|
||||
throw value;
|
||||
}
|
||||
value = global.fetch(r5);
|
||||
value = value.then(function(a0) {
|
||||
return a0.blob();
|
||||
});
|
||||
value = value.then(_fun99424);
|
||||
return value.then(function(a0) {
|
||||
return {data_url: a0};
|
||||
});
|
||||
}
|
||||
|
||||
function _fun99424(a0) { // fn#99424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13214:839, offset: 0x021c80f4, size: 41 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(1475) /* metro dependency 1475: ImageUtils */).readFileAsBase64(a0);
|
||||
}
|
||||
|
||||
function _fun99425(a0) { // fn#99425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13214:879, offset: 0x021c811d, size: 14 bytes, params: 2, frame: 2
|
||||
return {data_url: a0};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,417 @@
|
||||
/* Metro module 13025; source: modules/rpc/server/commands/invites.tsx; dependencies: [5, 1378, 1379, 4135, 661, 482, 13026, 4122, 8077, 10647, 13029, 677, 7860, 2] */
|
||||
function _fun99426(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13215:6, offset: 0x021c812b, size: 339 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const RPC_SCOPE_CONFIG = (require(4135) /* metro dependency 4135: Constants */).RPC_SCOPE_CONFIG;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).InstantInviteSources;
|
||||
let value = require(482) /* metro dependency 482: Constants */;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const env0_6 = value.RPCErrors;
|
||||
object2 = {};
|
||||
const INVITE_USER_EMBEDDED = RPCCommands.INVITE_USER_EMBEDDED;
|
||||
value = require(13026) /* metro dependency 13026: rpcSchema */;
|
||||
const createRPCCommand = value.createRPCCommand;
|
||||
const INVITE_USER_EMBEDDED2 = RPCCommands.INVITE_USER_EMBEDDED;
|
||||
const ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
const {DM_CHANNELS_MESSAGES_WRITE,
|
||||
ACTIVITIES_INVITES_WRITE} = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
object2[INVITE_USER_EMBEDDED] = Reflect.apply(createRPCCommand, value, [INVITE_USER_EMBEDDED2,
|
||||
{scope: {[ANY]: [DM_CHANNELS_MESSAGES_WRITE, ACTIVITIES_INVITES_WRITE]}, handler: function({socket, args}) {
|
||||
var env0_1 = args.user_id;
|
||||
return args.content(_fun99428)();
|
||||
}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/invites.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function handler_99427({socket, args}) { // fn#99427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13215:421, offset: 0x021c827e, size: 67 bytes, params: 2, frame: 11
|
||||
const env0_1 = args.user_id;
|
||||
return args.content(_fun99429)();
|
||||
}
|
||||
|
||||
function* _fun99429() { // fn#99429, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13215:465, offset: 0x021c82cc, size: 887 bytes, params: 1, frame: 21
|
||||
var r8;
|
||||
var binding;
|
||||
var RPCError;
|
||||
var object3;
|
||||
var prototype;
|
||||
var rPCError;
|
||||
var value5;
|
||||
var type;
|
||||
var value6;
|
||||
var binding2;
|
||||
var property;
|
||||
var value7;
|
||||
var sendEmbeddedActivityInviteUser;
|
||||
var id2;
|
||||
var object4;
|
||||
var ACTIVITY_INVITE;
|
||||
var value8;
|
||||
var error;
|
||||
var UNKNOWN_ERROR;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
const id = require.application.id;
|
||||
if (id == null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
throw new env2_0(env2_1[8]).RPCError({errorCode: env2_6.INVALID_COMMAND}, 'No application.');
|
||||
}
|
||||
const connectedActivityLocation = env2_3.getConnectedActivityLocation();
|
||||
if (connectedActivityLocation == null) {
|
||||
throw new env2_0(env2_1[8]).RPCError({errorCode: env2_6.NO_ELIGIBLE_ACTIVITY},
|
||||
'No eligible activity for application. Ensure an activity was set using setActivity.');
|
||||
}
|
||||
const kind = connectedActivityLocation.kind;
|
||||
const EmbeddedActivityLocationKind = env2_0(env2_1[9]).EmbeddedActivityLocationKind;
|
||||
const GUILD_CHANNEL = EmbeddedActivityLocationKind.GUILD_CHANNEL;
|
||||
if (GUILD_CHANNEL === kind) {
|
||||
binding = env2_0;
|
||||
value6 = binding(env2_1[10]);
|
||||
r8 = value6.validateOpenInviteDialog().channel;
|
||||
} else {
|
||||
binding = env2_0;
|
||||
if (binding(env2_1[9]).EmbeddedActivityLocationKind.GUILD_CHANNEL_MESSAGE === kind) {
|
||||
binding = env2_0;
|
||||
value6 = binding(env2_1[10]);
|
||||
r8 = value6.validateOpenInviteDialog().channel;
|
||||
} else {
|
||||
binding = env2_0;
|
||||
if (binding(env2_1[9]).EmbeddedActivityLocationKind.PRIVATE_CHANNEL === kind) {
|
||||
binding = env2_4;
|
||||
value5 = binding.getChannel(connectedActivityLocation.channel_id);
|
||||
if (value5 == null) {
|
||||
throw new env2_0(env2_1[8]).RPCError({errorCode: env2_6.INVALID_CHANNEL}, 'Invalid channel');
|
||||
}
|
||||
type = value5.type;
|
||||
binding = env2_0;
|
||||
if (type === binding(env2_1[11]).ChannelTypes.DM) {
|
||||
throw new env2_0(env2_1[8]).RPCError({errorCode: env2_6.INVALID_CHANNEL},
|
||||
'Cannot send invite to a DM');
|
||||
}
|
||||
r8 = value5;
|
||||
} else {
|
||||
binding = env2_0;
|
||||
if (binding(env2_1[9]).EmbeddedActivityLocationKind.PRIVATE_CHANNEL_MESSAGE !== kind) {
|
||||
throw new env2_0(env2_1[8]).RPCError({errorCode: env2_6.NO_ELIGIBLE_ACTIVITY},
|
||||
'Unsupported activity location');
|
||||
}
|
||||
binding = env2_4;
|
||||
value5 = binding.getChannel(connectedActivityLocation.channel_id);
|
||||
if (value5 == null) {
|
||||
throw new env2_0(env2_1[8]).RPCError({errorCode: env2_6.INVALID_CHANNEL}, 'Invalid channel');
|
||||
}
|
||||
type = value5.type;
|
||||
binding = env2_0;
|
||||
if (type === binding(env2_1[11]).ChannelTypes.DM) {
|
||||
throw new env2_0(env2_1[8]).RPCError({errorCode: env2_6.INVALID_CHANNEL},
|
||||
'Cannot send invite to a DM');
|
||||
}
|
||||
r8 = value5;
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_1;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
property = binding2[12];
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value7 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
sendEmbeddedActivityInviteUser = value7.sendEmbeddedActivityInviteUser;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3 = {};
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
id2 = r8.id;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.channelId = id2;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.applicationId = id;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.userId = dependencyMap;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding = env1_2;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.prefixedContent = binding;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.location = 'RPC_ACTIVITY_INVITE_USER';
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object4 = {};
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
binding = env2_5;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
ACTIVITY_INVITE = binding.ACTIVITY_INVITE;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object4.source = ACTIVITY_INVITE;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
object3.inviteAnalyticsMetadata = object4;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(sendEmbeddedActivityInviteUser, value7, [object3]);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
yield value;
|
||||
try {
|
||||
value = undefined;
|
||||
value8 = false;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
RPCError = binding(env2_1[8]).RPCError;
|
||||
object3 = {};
|
||||
UNKNOWN_ERROR = env2_6.UNKNOWN_ERROR;
|
||||
object3.errorCode = UNKNOWN_ERROR;
|
||||
prototype = RPCError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: RPCError}});
|
||||
rPCError = new RPCError(object3, 'Failed to invite user');
|
||||
value = rPCError instanceof Object ? rPCError : value;
|
||||
throw value;
|
||||
}
|
||||
return value8 ? value : undefined;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,47 @@
|
||||
/* Metro module 13036; source: modules/rpc/server/commands/logs.tsx; dependencies: [661, 3, 8079, 8081, 2] */
|
||||
function _fun99507(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13226:6, offset: 0x021cb5db, size: 197 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const RPC_APPLICATION_LOGGING_CATEGORY = value.RPC_APPLICATION_LOGGING_CATEGORY;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value(RPC_APPLICATION_LOGGING_CATEGORY);
|
||||
object2 = {};
|
||||
const CAPTURE_LOG = RPCCommands.CAPTURE_LOG;
|
||||
object2[CAPTURE_LOG] = {validation: validation_99508, handler: handler_99509};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/logs.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validation_99508(a0) { // fn#99508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13226:208, offset: 0x021cb6a0, size: 133 bytes, params: 2, frame: 15
|
||||
let value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys = value.keys;
|
||||
const object2 = {};
|
||||
object2.level = a0.string().max(10).required();
|
||||
object2.message = a0.string().max(1000).required();
|
||||
return Reflect.apply(keys, value, [object2]);
|
||||
}
|
||||
|
||||
function handler_99509({socket, args}) { // fn#99509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13226:316, offset: 0x021cb725, size: 231 bytes, params: 2, frame: 18
|
||||
const level = args.level;
|
||||
const message = args.message;
|
||||
const rpcHelpersModule = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
rpcHelpersModule.validatePostMessageTransport(socket.transport);
|
||||
const value2 = '' + socket.application.id + ' - ' + message;
|
||||
if (level === 'log') {
|
||||
env0_3.log(value2);
|
||||
} else if (level === 'warn') {
|
||||
env0_3.warn(value2);
|
||||
} else if (level === 'debug') {
|
||||
env0_3.verbose(value2);
|
||||
} else if (level === 'info') {
|
||||
env0_3.info(value2);
|
||||
} else if (level === 'error') {
|
||||
env0_3.error(value2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/* Metro module 13037; source: modules/rpc/server/commands/networking.tsx; dependencies: [4135, 661, 507, 683, 2] */
|
||||
function _fun99510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13227:6, offset: 0x021cb80c, size: 273 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const RPC_LOCAL_SCOPE = (require(4135) /* metro dependency 4135: Constants */).RPC_LOCAL_SCOPE;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_3 = constantsModule.Endpoints;
|
||||
const env0_4 = constantsModule.AnalyticEvents;
|
||||
const RPCCommands = constantsModule.RPCCommands;
|
||||
object2 = {};
|
||||
const GET_NETWORKING_CONFIG = RPCCommands.GET_NETWORKING_CONFIG;
|
||||
object2[GET_NETWORKING_CONFIG] = {scope: RPC_LOCAL_SCOPE, handler: handler_99511};
|
||||
const NETWORKING_SYSTEM_METRICS = RPCCommands.NETWORKING_SYSTEM_METRICS;
|
||||
object2[NETWORKING_SYSTEM_METRICS] = {scope: RPC_LOCAL_SCOPE, handler: function({socket, args}) {
|
||||
args.application_id = socket.application.id;
|
||||
importDefault(dependencyMap[3]).track(AnalyticEvents.NETWORKING_SYSTEM_METRICS, args);
|
||||
}};
|
||||
const NETWORKING_PEER_METRICS = RPCCommands.NETWORKING_PEER_METRICS;
|
||||
object2[NETWORKING_PEER_METRICS] = {scope: RPC_LOCAL_SCOPE, handler: function({socket, args}) {
|
||||
args.application_id = socket.application.id;
|
||||
importDefault(dependencyMap[3]).track(AnalyticEvents.NETWORKING_PEER_METRICS, args);
|
||||
}};
|
||||
const NETWORKING_CREATE_TOKEN = RPCCommands.NETWORKING_CREATE_TOKEN;
|
||||
object2[NETWORKING_CREATE_TOKEN] = {scope: RPC_LOCAL_SCOPE, handler: handler_99517};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/networking.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function handler_99511() { // fn#99511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13227:230, offset: 0x021cb91d, size: 235 bytes, params: 1, frame: 21
|
||||
const Promise = global.Promise;
|
||||
const all = Promise.all;
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
const get = HTTP.get;
|
||||
const protocol = global.location.protocol;
|
||||
const GLOBAL_ENV = global.window.GLOBAL_ENV;
|
||||
const NETWORKING_ENDPOINT = GLOBAL_ENV.NETWORKING_ENDPOINT;
|
||||
let value2 = Reflect.apply(get, HTTP, [{'url': null, 'retries': 3, 'rejectWithError': false,
|
||||
url: protocol + NETWORKING_ENDPOINT}]);
|
||||
items = [value2.then(function(a0) {
|
||||
return a0.body.address;
|
||||
})];
|
||||
const post = HTTP.post;
|
||||
const NETWORKING_TOKEN = Endpoints.NETWORKING_TOKEN;
|
||||
let value = Reflect.apply(post, HTTP, [{'url': null, 'retries': 3, 'oldFormErrors': true, 'rejectWithError': false,
|
||||
url: NETWORKING_TOKEN}]);
|
||||
items[1] = value.then(function(a0) {
|
||||
return a0.body.token;
|
||||
});
|
||||
return Reflect.apply(all, Promise, [items]).then(function(a0) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r3;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r2 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r1 = value;
|
||||
r3 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r1 = value;
|
||||
r3 = value3;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = item;
|
||||
r3 = value3;
|
||||
}
|
||||
}
|
||||
if (!r3) {
|
||||
r0.return();
|
||||
}
|
||||
return {address: r2, token: r1};
|
||||
});
|
||||
}
|
||||
|
||||
function handler_99517() { // fn#99517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13227:889, offset: 0x021cbb13, size: 92 bytes, params: 1, frame: 12
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
const post = HTTP.post;
|
||||
const NETWORKING_TOKEN = Endpoints.NETWORKING_TOKEN;
|
||||
return Reflect.apply(post, HTTP, [{'url': null, 'retries': 1, 'oldFormErrors': true, 'rejectWithError': false,
|
||||
url: NETWORKING_TOKEN}]).then(function(a0) {
|
||||
return a0.body;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Metro module 13054; source: modules/rpc/server/commands/platformBehaviors.tsx; dependencies: [482, 2] */
|
||||
function _fun99675(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13244:6, offset: 0x021d1174, size: 125 bytes, params: 8, frame: 18
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const RPCCommands = (require(482) /* metro dependency 482: Constants */).RPCCommands;
|
||||
object2 = {};
|
||||
const GET_PLATFORM_BEHAVIORS = RPCCommands.GET_PLATFORM_BEHAVIORS;
|
||||
object2[GET_PLATFORM_BEHAVIORS] = {handler: function() {
|
||||
return {iosKeyboardResizesView: true};
|
||||
}};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/platformBehaviors.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,434 @@
|
||||
/* Metro module 13038; source: modules/rpc/server/commands/providers.tsx; dependencies: [5, 5040, 4135, 661, 4237, 482, 8079, 8081, 4915, 8076, 694, 1239, 9354, 5042, 2] */
|
||||
function _fun99519(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:6, offset: 0x021cbb6f, size: 434 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importDefault(5) /* metro dependency 5 */;
|
||||
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
|
||||
const {RPC_AUTHENTICATED_SCOPE, RPC_SCOPE_CONFIG} = require(4135) /* metro dependency 4135: Constants */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = constantsModule.AnalyticsLocations;
|
||||
const env0_7 = constantsModule.ComponentActions;
|
||||
const env0_8 = constantsModule.PlatformTypes;
|
||||
const {AM_HARMONY_PRD_APPLICATION_ID,
|
||||
AM_HARMONY_STG_APPLICATION_ID} = require(4237) /* metro dependency 4237: Constants */;
|
||||
const constantsModule2 = require(482) /* metro dependency 482: Constants */;
|
||||
const RPCCommands = constantsModule2.RPCCommands;
|
||||
const env0_9 = constantsModule2.RPCErrors;
|
||||
const Set = global.Set;
|
||||
const set = new Set([AM_HARMONY_PRD_APPLICATION_ID, AM_HARMONY_STG_APPLICATION_ID]);
|
||||
object2 = {};
|
||||
const GET_PROVIDER_ACCESS_TOKEN = RPCCommands.GET_PROVIDER_ACCESS_TOKEN;
|
||||
let ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
object2[GET_PROVIDER_ACCESS_TOKEN] = {scope: {[ANY]: [RPC_AUTHENTICATED_SCOPE]}, validation: validation_99520,
|
||||
handler: handler_99521};
|
||||
const MAYBE_GET_PROVIDER_ACCESS_TOKEN = RPCCommands.MAYBE_GET_PROVIDER_ACCESS_TOKEN;
|
||||
const object3 = {};
|
||||
ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
object3.scope = {[ANY]: [RPC_AUTHENTICATED_SCOPE]};
|
||||
object3.validation = validation_99534;
|
||||
const env0_3 = value(_fun99536);
|
||||
object3.handler = handler_99537;
|
||||
object2[MAYBE_GET_PROVIDER_ACCESS_TOKEN] = object3;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/providers.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validation_99520(a0) { // fn#99520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:449, offset: 0x021cbd21, size: 95 bytes, params: 2, frame: 14
|
||||
let value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys = value.keys;
|
||||
const object2 = {};
|
||||
object2.provider = a0.string().required();
|
||||
object2.connection_redirect = a0.string();
|
||||
return Reflect.apply(keys, value, [object2]);
|
||||
}
|
||||
|
||||
function handler_99521({socket, args}) { // fn#99521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:552, offset: 0x021cbd80, size: 445 bytes, params: 2, frame: 20
|
||||
var Promise;
|
||||
var value5;
|
||||
var promise;
|
||||
var defaultImport4;
|
||||
const provider = args.provider;
|
||||
const env0_1 = args.connection_redirect;
|
||||
var value;
|
||||
const rpcHelpersModule = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
rpcHelpersModule.validatePostMessageTransport(socket.transport);
|
||||
const moduleValue2 = rpcHelpersModule;
|
||||
const value2 = moduleValue2.validateApplication(socket.application);
|
||||
if ((importDefault(4915) /* metro dependency 4915: Platforms */).get(provider) == null) {
|
||||
defaultImport4 = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_PROVIDER;
|
||||
value = 'Platform not found for provider "' + provider + '"';
|
||||
value = new defaultImport4();
|
||||
throw value;
|
||||
}
|
||||
const AMAZON_MUSIC = PlatformTypes.AMAZON_MUSIC;
|
||||
if (provider !== AMAZON_MUSIC) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.UNAUTHORIZED_FOR_APPLICATION},
|
||||
|
||||
'Command not available for this application');
|
||||
}
|
||||
const binding = env0_10;
|
||||
if (binding.has(value2)) {
|
||||
Promise = global.Promise;
|
||||
value = _fun99522();
|
||||
value5 = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
promise = new Promise();
|
||||
return promise instanceof Object ? promise : value5;
|
||||
}
|
||||
const defaultImport2 = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
const UNAUTHORIZED_FOR_APPLICATION = RPCErrors.UNAUTHORIZED_FOR_APPLICATION;
|
||||
throw new defaultImport2({errorCode: UNAUTHORIZED_FOR_APPLICATION}, 'Command not available for this application');
|
||||
}
|
||||
|
||||
function validation_99534(a0) { // fn#99534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:2265, offset: 0x021cc3dd, size: 81 bytes, params: 2, frame: 13
|
||||
let value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys = value.keys;
|
||||
const object2 = {};
|
||||
object2.provider = a0.string().required();
|
||||
return Reflect.apply(keys, value, [object2]);
|
||||
}
|
||||
|
||||
async function _fun99536({socket, args}) { // fn#99536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:2343, offset: 0x021cc442, size: 641 bytes, params: 2, frame: 21
|
||||
var account;
|
||||
var value12;
|
||||
var value13;
|
||||
var value21;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const provider = args.provider;
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
let binding = env1_0;
|
||||
const binding2 = env1_2;
|
||||
const value4 = binding(binding2[7]);
|
||||
value4.validatePostMessageTransport(socket.transport);
|
||||
const value5 = binding(binding2[7]);
|
||||
const value6 = value5.validateApplication(socket.application);
|
||||
const value8 = env1_1(binding2[8]).get(provider);
|
||||
if (value8 == null) {
|
||||
value21 = env1_1(env1_2[9]);
|
||||
value = 'Platform not found for provider "' + provider + '"';
|
||||
value = new value21({errorCode: env1_9.INVALID_PROVIDER}, value);
|
||||
throw value;
|
||||
}
|
||||
const AMAZON_MUSIC = env1_8.AMAZON_MUSIC;
|
||||
if (provider !== AMAZON_MUSIC) {
|
||||
throw new env1_1(env1_2[9])({errorCode: env1_9.UNAUTHORIZED_FOR_APPLICATION},
|
||||
'Command not available for this application');
|
||||
}
|
||||
if (Reflect.apply(env1_10.has, binding, [value6])) {
|
||||
binding = env1_5;
|
||||
account = binding.getAccount(null, provider);
|
||||
if (account == null) {
|
||||
throw new env1_1(env1_2[9])({errorCode: env1_9.NO_CONNECTION_FOUND}, 'No connection found');
|
||||
}
|
||||
binding = env1_1;
|
||||
value12 = binding(env1_2[13]);
|
||||
await value12.refreshAccessToken(value8.type, account.id);
|
||||
value13 = undefined;
|
||||
if (false) {
|
||||
return value13;
|
||||
}
|
||||
if (value13 == null) {
|
||||
throw new env1_1(env1_2[9])({errorCode: env1_9.OAUTH2_ERROR},
|
||||
'Refreshing access token did not return a new access token');
|
||||
}
|
||||
return {access_token: value13};
|
||||
}
|
||||
const value9 = env1_1(env1_2[9]);
|
||||
const UNAUTHORIZED_FOR_APPLICATION = env1_9.UNAUTHORIZED_FOR_APPLICATION;
|
||||
throw new value9({errorCode: UNAUTHORIZED_FOR_APPLICATION}, 'Command not available for this application');
|
||||
}
|
||||
|
||||
function _fun99522() { // fn#99522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:1096, offset: 0x021cbf3d, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_4(_fun99523);
|
||||
return _fun99533;
|
||||
}
|
||||
|
||||
function* _fun99523(a0, a1) { // fn#99523, offset: 0x021cbf61, size: 44 bytes, params: 3, frame: 2
|
||||
const cleanupPromise = function() {
|
||||
importDefault(dependencyMap[10]).unsubscribe('USER_CONNECTIONS_UPDATE', handleConnectionsUpdate);
|
||||
var ComponentDispatch = require(dependencyMap[11]).ComponentDispatch;
|
||||
var CONNECTIONS_CALLBACK_ERROR = ComponentActions.CONNECTIONS_CALLBACK_ERROR;
|
||||
ComponentDispatch.unsubscribe(CONNECTIONS_CALLBACK_ERROR, handleConnectionsCallbackError);
|
||||
};
|
||||
return _fun99524;
|
||||
}
|
||||
|
||||
function* _fun99524(a0, a1) { // fn#99524, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:1116, offset: 0x021cbf8d, size: 417 bytes, params: 3, frame: 23
|
||||
var environment;
|
||||
var closure;
|
||||
var closure2;
|
||||
var getAccount;
|
||||
var value3;
|
||||
var value4;
|
||||
var property;
|
||||
var defaultImport;
|
||||
var refreshAccessToken;
|
||||
var binding;
|
||||
var type;
|
||||
var id;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var object2;
|
||||
var defaultImport2;
|
||||
var OAUTH2_ERROR;
|
||||
var prototype;
|
||||
var defaultImport22;
|
||||
var error;
|
||||
var defaultImport3;
|
||||
var subscribe;
|
||||
var ComponentDispatch;
|
||||
var CONNECTIONS_CALLBACK_ERROR;
|
||||
var defaultImport4;
|
||||
var ACTIVITY_RPC;
|
||||
let value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
reduciblePort39: while (true) {
|
||||
exceptionLanding37: while (true) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
closure = handleConnectionsUpdate_99525;
|
||||
var handleConnectionsUpdate_99525 = closure;
|
||||
closure2 = function() {
|
||||
var defaultImport = importDefault(dependencyMap[9]);
|
||||
var object = {};
|
||||
object.errorCode = RPCErrors.OAUTH2_ERROR;
|
||||
var value4 = 'OAuth2 setup for "' + provider + '" failed';
|
||||
var value5 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
|
||||
var value6 = new defaultImport(object, value4);
|
||||
require(value6 instanceof Object ? value6 : value5);
|
||||
cleanupPromise_99528();
|
||||
};
|
||||
var handleConnectionsCallbackError_99527 = closure2;
|
||||
var cleanupPromise_99528Binding = cleanupPromise_99528;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
getAccount = ConnectedAccountsStore.getAccount;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
value4 = Reflect.apply(getAccount, ConnectedAccountsStore, [null, provider]);
|
||||
if (value4 == null) {
|
||||
defaultImport3 = importDefault(dependencyMap[10]);
|
||||
subscribe = defaultImport3.subscribe;
|
||||
Reflect.apply(subscribe, defaultImport3, ['USER_CONNECTIONS_UPDATE', closure]);
|
||||
ComponentDispatch = require(dependencyMap[11]).ComponentDispatch;
|
||||
subscribe = ComponentDispatch.subscribe;
|
||||
CONNECTIONS_CALLBACK_ERROR = ComponentActions.CONNECTIONS_CALLBACK_ERROR;
|
||||
Reflect.apply(subscribe, ComponentDispatch, [CONNECTIONS_CALLBACK_ERROR, closure2]);
|
||||
defaultImport4 = importDefault(dependencyMap[12]);
|
||||
type = env2_2.type;
|
||||
ACTIVITY_RPC = AnalyticsLocations.ACTIVITY_RPC;
|
||||
defaultImport4({platformType: type, location: ACTIVITY_RPC, successRedirect: connection_redirect});
|
||||
break reduciblePort39;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
property = dependencyMap[13];
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
defaultImport = importDefault(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
refreshAccessToken = defaultImport.refreshAccessToken;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
binding = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
type = binding.type;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
id = value4.id;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
value5 = Reflect.apply(refreshAccessToken, defaultImport, [type, id]);
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
yield value5;
|
||||
try {
|
||||
value6 = undefined;
|
||||
value7 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
if (value7) {
|
||||
return value6;
|
||||
}
|
||||
try {
|
||||
value8 = value6 == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
if (!value8) {
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
object2.access_token = value6;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
a0(object2);
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
break reduciblePort39;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
property = dependencyMap[9];
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
defaultImport2 = importDefault(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
OAUTH2_ERROR = RPCErrors.OAUTH2_ERROR;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
object2.errorCode = OAUTH2_ERROR;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
prototype = defaultImport2.prototype;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
defaultImport22 = new defaultImport2(object2,
|
||||
'Refreshing access token did not return a new access token');
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
value = defaultImport22 instanceof Object ? defaultImport22 : value;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
try {
|
||||
throw value;
|
||||
} catch (error) {
|
||||
break exceptionLanding37;
|
||||
}
|
||||
}
|
||||
a1(error);
|
||||
break reduciblePort39;
|
||||
}
|
||||
}
|
||||
|
||||
function handleConnectionsUpdate(a0) { // fn#99529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:1170, offset: 0x021cc284, size: 96 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
var value2;
|
||||
let value = environment.__proto__.__proto__;
|
||||
if (env2_2 != null) {
|
||||
value = (a0.accounts ?? []).find(_fun99530);
|
||||
if (value != null) {
|
||||
value2 = environment.__proto__;
|
||||
env1_0({access_token: value.access_token});
|
||||
cleanupPromise();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleConnectionsCallbackError() { // fn#99531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:1347, offset: 0x021cc2fe, size: 125 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
const binding = env3_4;
|
||||
const defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
const OAUTH2_ERROR = RPCErrors.OAUTH2_ERROR;
|
||||
value = environment.__proto__.__proto__;
|
||||
value = 'OAuth2 setup for "' + provider + '" failed';
|
||||
value = new defaultImport({errorCode: OAUTH2_ERROR}, value);
|
||||
binding(value);
|
||||
cleanupPromise();
|
||||
}
|
||||
|
||||
function handleConnectionsUpdate_99525(a0) { // fn#99525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:1170, offset: 0x021cc12e, size: 93 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
if (env3_2 != null) {
|
||||
value = (a0.accounts ?? []).find(_fun99526);
|
||||
if (value != null) {
|
||||
env0_0({access_token: value.access_token});
|
||||
cleanupPromise_99528();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function cleanupPromise_99528() { // fn#99528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:1483, offset: 0x021cc222, size: 98 bytes, params: 1, frame: 17
|
||||
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
let unsubscribe = defaultImport.unsubscribe;
|
||||
Reflect.apply(unsubscribe, defaultImport, ['USER_CONNECTIONS_UPDATE', handleConnectionsUpdate_99525]);
|
||||
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
unsubscribe = ComponentDispatch.unsubscribe;
|
||||
const CONNECTIONS_CALLBACK_ERROR = ComponentActions.CONNECTIONS_CALLBACK_ERROR;
|
||||
Reflect.apply(unsubscribe, ComponentDispatch, [CONNECTIONS_CALLBACK_ERROR, handleConnectionsCallbackError_99527]);
|
||||
}
|
||||
|
||||
function _fun99530({type}) { // fn#99530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:1264, offset: 0x021cc2e4, size: 26 bytes, params: 2, frame: 2
|
||||
return type === env3_2.type;
|
||||
}
|
||||
|
||||
function _fun99526({type}) { // fn#99526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13228:1264, offset: 0x021cc18b, size: 26 bytes, params: 2, frame: 2
|
||||
return type === env4_2.type;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
/* Metro module 13057; source: modules/rpc/server/commands/quests.tsx; dependencies: [7093, 661, 4122, 8081, 7116, 8076, 683, 694, 9524, 2] */
|
||||
function _fun99692(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13247:6, offset: 0x021d19fa, size: 307 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const RPCCommands = constantsModule.RPCCommands;
|
||||
const env0_4 = constantsModule.RPCErrors;
|
||||
const env0_5 = constantsModule.AnalyticEvents;
|
||||
object2 = {};
|
||||
const GET_QUEST_ENROLLMENT_STATUS = RPCCommands.GET_QUEST_ENROLLMENT_STATUS;
|
||||
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
let IDENTIFY = OAuth2Scopes.IDENTIFY;
|
||||
object2[GET_QUEST_ENROLLMENT_STATUS] = {scope: IDENTIFY, handler: handler_99693};
|
||||
const QUEST_START_TIMER = RPCCommands.QUEST_START_TIMER;
|
||||
IDENTIFY = OAuth2Scopes.IDENTIFY;
|
||||
object2[QUEST_START_TIMER] = {scope: IDENTIFY, handler: handler_99694};
|
||||
const GET_QUEST = RPCCommands.GET_QUEST;
|
||||
IDENTIFY = OAuth2Scopes.IDENTIFY;
|
||||
object2[GET_QUEST] = {scope: IDENTIFY, handler: handler_99695};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/quests.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function handler_99693({socket, args}) { // fn#99693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13247:238, offset: 0x021d1b2d, size: 303 bytes, params: 2, frame: 19
|
||||
var defaultImport;
|
||||
const quest_id = args.quest_id;
|
||||
var value;
|
||||
const rpcHelpersModule = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
rpcHelpersModule.validatePostMessageTransport(socket.transport);
|
||||
const moduleValue2 = rpcHelpersModule;
|
||||
const value3 = moduleValue2.validateApplication(socket.application);
|
||||
const quest = QuestStore.getQuest(quest_id);
|
||||
const activityApplicationId = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getActivityApplicationId(quest);
|
||||
if (quest == null) {
|
||||
defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_COMMAND;
|
||||
value = 'Quest not found: ' + quest_id;
|
||||
value = new defaultImport();
|
||||
throw value;
|
||||
}
|
||||
if (activityApplicationId == null) {
|
||||
defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_COMMAND;
|
||||
value = 'Quest not found: ' + quest_id;
|
||||
value = new defaultImport();
|
||||
throw value;
|
||||
}
|
||||
if (activityApplicationId !== value3) {
|
||||
defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_COMMAND;
|
||||
value = 'Quest not found: ' + quest_id;
|
||||
value = new defaultImport();
|
||||
throw value;
|
||||
}
|
||||
const object2 = {quest_id: quest_id};
|
||||
let userStatus = quest.userStatus;
|
||||
object2.is_enrolled = userStatus?.enrolledAt != null;
|
||||
userStatus = quest.userStatus;
|
||||
object2.enrolled_at = userStatus?.enrolledAt ?? null;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function handler_99694({socket, args}) { // fn#99694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13247:755, offset: 0x021d1c5c, size: 435 bytes, params: 2, frame: 20
|
||||
var defaultImport3;
|
||||
const quest_id = args.quest_id;
|
||||
var value;
|
||||
const rpcHelpersModule = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
rpcHelpersModule.validatePostMessageTransport(socket.transport);
|
||||
const moduleValue2 = rpcHelpersModule;
|
||||
const value3 = moduleValue2.validateApplication(socket.application);
|
||||
const quest = QuestStore.getQuest(quest_id);
|
||||
const playActivityApplicationId = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getPlayActivityApplicationId(quest);
|
||||
if (quest == null) {
|
||||
defaultImport3 = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_COMMAND;
|
||||
value = 'Quest not found: ' + quest_id;
|
||||
value = new defaultImport3();
|
||||
throw value;
|
||||
}
|
||||
if (playActivityApplicationId == null) {
|
||||
defaultImport3 = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_COMMAND;
|
||||
value = 'Quest not found: ' + quest_id;
|
||||
value = new defaultImport3();
|
||||
throw value;
|
||||
}
|
||||
if (playActivityApplicationId !== value3) {
|
||||
defaultImport3 = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_COMMAND;
|
||||
value = 'Quest not found: ' + quest_id;
|
||||
value = new defaultImport3();
|
||||
throw value;
|
||||
}
|
||||
const userStatus = quest.userStatus;
|
||||
if (userStatus?.enrolledAt == null) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_COMMAND},
|
||||
'User is not enrolled in quest');
|
||||
}
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const RPC_QUEST_START_TIMER_CALLED = AnalyticEvents.RPC_QUEST_START_TIMER_CALLED;
|
||||
Reflect.apply(track, defaultImport, [RPC_QUEST_START_TIMER_CALLED, {application_id: value3, quest_id: quest_id}]);
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.dispatch({type: 'QUEST_APPLICATION_START_TIMER', questId: quest_id, applicationId: value3});
|
||||
return {success: true};
|
||||
}
|
||||
|
||||
function handler_99695({socket}) { // fn#99695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13247:1425, offset: 0x021d1e0f, size: 235 bytes, params: 2, frame: 20
|
||||
const rpcHelpersModule = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
rpcHelpersModule.validatePostMessageTransport(socket.transport);
|
||||
const moduleValue2 = rpcHelpersModule;
|
||||
const eligibleQuestsForApplicationId = (require(9524) /* metro dependency 9524: QuestMatchingUtils */).getEligibleQuestsForApplicationId(QuestStore.quests,
|
||||
moduleValue2.validateApplication(socket.application), true);
|
||||
if (eligibleQuestsForApplicationId.length === 0) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_COMMAND},
|
||||
'No eligible quests found');
|
||||
}
|
||||
let value = eligibleQuestsForApplicationId.map(function(a0) {
|
||||
var r5;
|
||||
var r3;
|
||||
var property = a0.userStatus;
|
||||
var value = null;
|
||||
var value2 = undefined;
|
||||
r5 = value == property ? value2 : property.enrolledAt;
|
||||
property = a0.userStatus;
|
||||
r3 = value == property ? value2 : property.completedAt;
|
||||
return {quest_id: a0.id, enrolled_at: value != r5 ? r5 : value, completed_at: value != r3 ? r3 : value,
|
||||
external_cta_url: a0.config.ctaConfig.link};
|
||||
});
|
||||
return value.sort(_fun99697)[0];
|
||||
}
|
||||
|
||||
function _fun99697(a0, a1) { // fn#99697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13247:1944, offset: 0x021d1f70, size: 169 bytes, params: 3, frame: 16
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
var value;
|
||||
var Date;
|
||||
var prototype;
|
||||
var date;
|
||||
var value2;
|
||||
var value3;
|
||||
let enrolled_at = a0.enrolled_at;
|
||||
if (enrolled_at != null) {
|
||||
enrolled_at = a0.enrolled_at;
|
||||
value = 1;
|
||||
if (enrolled_at == null) {
|
||||
r1 = value;
|
||||
} else {
|
||||
enrolled_at = a1.enrolled_at;
|
||||
value = -1;
|
||||
if (enrolled_at == null) {
|
||||
r2 = value;
|
||||
} else {
|
||||
Date = global.Date;
|
||||
enrolled_at = a0.enrolled_at;
|
||||
prototype = Date.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date(enrolled_at);
|
||||
value = date instanceof Object ? date : value;
|
||||
value = value.getTime();
|
||||
Date = global.Date;
|
||||
enrolled_at = a1.enrolled_at;
|
||||
prototype = Date.prototype;
|
||||
value2 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date(enrolled_at);
|
||||
value3 = date instanceof Object ? date : value2;
|
||||
value -= value3.getTime();
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
enrolled_at = a1.enrolled_at;
|
||||
value = 0;
|
||||
if (enrolled_at == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
enrolled_at = a0.enrolled_at;
|
||||
value = 1;
|
||||
if (enrolled_at == null) {
|
||||
r1 = value;
|
||||
} else {
|
||||
enrolled_at = a1.enrolled_at;
|
||||
value = -1;
|
||||
if (enrolled_at == null) {
|
||||
r2 = value;
|
||||
} else {
|
||||
Date = global.Date;
|
||||
enrolled_at = a0.enrolled_at;
|
||||
prototype = Date.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date(enrolled_at);
|
||||
value = date instanceof Object ? date : value;
|
||||
value = value.getTime();
|
||||
Date = global.Date;
|
||||
enrolled_at = a1.enrolled_at;
|
||||
prototype = Date.prototype;
|
||||
value2 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date(enrolled_at);
|
||||
value3 = date instanceof Object ? date : value2;
|
||||
value -= value3.getTime();
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
/* Metro module 13039; source: modules/rpc/server/commands/relationships.tsx; dependencies: [57, 3793, 1878, 4135, 661, 13026, 4122, 483, 8076, 8081, 2] */
|
||||
function _fun99538(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13229:6, offset: 0x021cc6c3, size: 345 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_99541 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const RPC_SCOPE_CONFIG = (require(4135) /* metro dependency 4135: Constants */).RPC_SCOPE_CONFIG;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = value.ApplicationFlags;
|
||||
const env0_8 = value.RelationshipTypes;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const env0_9 = value.RPCErrors;
|
||||
object2 = {};
|
||||
const GET_RELATIONSHIPS = RPCCommands.GET_RELATIONSHIPS;
|
||||
value = require(13026) /* metro dependency 13026: rpcSchema */;
|
||||
const createRPCCommand = value.createRPCCommand;
|
||||
const GET_RELATIONSHIPS2 = RPCCommands.GET_RELATIONSHIPS;
|
||||
const ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
const RELATIONSHIPS_READ = OAuth2Scopes.RELATIONSHIPS_READ;
|
||||
object2[GET_RELATIONSHIPS] = Reflect.apply(createRPCCommand, value, [GET_RELATIONSHIPS2,
|
||||
{scope: {[ANY]: [RELATIONSHIPS_READ]}, handler: handler_99542}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/relationships.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_99539(a0, a1) { // fn#99539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13229:242, offset: 0x021cc81c, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun99540;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_99541(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_99541(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_99541(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun99540;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function handler_99542(a0) { // fn#99542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13229:1287, offset: 0x021cc990, size: 434 bytes, params: 2, frame: 27
|
||||
var r5;
|
||||
var value7;
|
||||
var value8;
|
||||
var property;
|
||||
var property2;
|
||||
var NONE;
|
||||
var user;
|
||||
var moduleValue4;
|
||||
var value10;
|
||||
var push;
|
||||
var moduleValue5;
|
||||
var transformApplicationRelationship;
|
||||
var id;
|
||||
var value11;
|
||||
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
||||
const has = bigFlagUtilsModule.has;
|
||||
const moduleValue2 = bigFlagUtilsModule;
|
||||
let deserialize = moduleValue2.deserialize;
|
||||
let socket = a0.socket;
|
||||
let application = socket.application;
|
||||
const flags = application.flags;
|
||||
const value2 = 0;
|
||||
const value3 = Reflect.apply(deserialize, moduleValue2, [flags ?? value2]);
|
||||
const moduleValue3 = bigFlagUtilsModule;
|
||||
deserialize = moduleValue3.deserialize;
|
||||
const DISABLE_RELATIONSHIPS_ACCESS = ApplicationFlags.DISABLE_RELATIONSHIPS_ACCESS;
|
||||
if (Reflect.apply(has, bigFlagUtilsModule, [value3, Reflect.apply(deserialize, moduleValue3,
|
||||
[DISABLE_RELATIONSHIPS_ACCESS])])) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_PERMISSIONS},
|
||||
|
||||
'Missing Permissions');
|
||||
}
|
||||
const items = [];
|
||||
const _createForOfIteratorHelperLoose_99539Binding = _createForOfIteratorHelperLoose_99539;
|
||||
const mutableRelationships = RelationshipStore.getMutableRelationships();
|
||||
const value5 = _createForOfIteratorHelperLoose_99539Binding(mutableRelationships.entries());
|
||||
const value6 = value5();
|
||||
let done = value6.done;
|
||||
if (!done) {
|
||||
r5 = value6;
|
||||
while (true) {
|
||||
value7 = r5.value;
|
||||
value8 = env0_4(value7, 2);
|
||||
property = value8[value2];
|
||||
property2 = value8[1];
|
||||
NONE = RelationshipTypes.NONE;
|
||||
if (property2 !== NONE) {
|
||||
user = UserStore.getUser(property);
|
||||
if (user == null) {
|
||||
break;
|
||||
}
|
||||
moduleValue4 = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
value10 = moduleValue4.transformBaseRelationship(property2, user);
|
||||
push = items.push;
|
||||
moduleValue5 = require(8081) /* metro dependency 8081: RPCHelpers */;
|
||||
transformApplicationRelationship = moduleValue5.transformApplicationRelationship;
|
||||
socket = a0.socket;
|
||||
application = socket.application;
|
||||
id = application.id;
|
||||
Reflect.apply(push, items, [Reflect.apply(transformApplicationRelationship, moduleValue5, [value10,
|
||||
id])]);
|
||||
break;
|
||||
}
|
||||
value11 = value5();
|
||||
done = value11.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r5 = value11;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return {relationships: items};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,548 @@
|
||||
/* Metro module 13040; source: modules/rpc/server/commands/setActivity.tsx; dependencies: [4234, 4135, 661, 4122, 8079, 8844, 8076, 694, 6884, 8045, 22, 672, 6873, 683, 2] */
|
||||
function _fun99543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13230:6, offset: 0x021ccb42, size: 345 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
let value = require(4135) /* metro dependency 4135: Constants */;
|
||||
const RPC_SCOPE_CONFIG = value.RPC_SCOPE_CONFIG;
|
||||
const RPC_LOCAL_SCOPE = value.RPC_LOCAL_SCOPE;
|
||||
const env0_4 = value.TransportTypes;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.ActivityGamePlatforms;
|
||||
const env0_6 = value.ActivityPartyPrivacy;
|
||||
const env0_7 = value.ActivityTypes;
|
||||
const env0_8 = value.AnalyticEvents;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const env0_9 = value.RPCErrors;
|
||||
const env0_10 = ['1402418171662569542'];
|
||||
object2 = {};
|
||||
const SET_ACTIVITY = RPCCommands.SET_ACTIVITY;
|
||||
const ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
const {RPC, RPC_ACTIVITIES_WRITE} = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
object2[SET_ACTIVITY] = {scope: {[ANY]: [RPC, RPC_ACTIVITIES_WRITE, RPC_LOCAL_SCOPE]}, validation: validation_99544,
|
||||
handler: handler_99545};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/setActivity.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validation_99544(a0) { // fn#99544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13230:449, offset: 0x021ccc9b, size: 1470 bytes, params: 2, frame: 34
|
||||
const value3 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0).required();
|
||||
const keys = value3.keys;
|
||||
const object8 = {};
|
||||
const value4 = a0.number();
|
||||
object8.pid = value4.min(0);
|
||||
const value5 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
const keys2 = value5.keys;
|
||||
const object9 = {};
|
||||
const value7 = a0.string().min(1);
|
||||
object9.name = value7.max(128);
|
||||
object9.state = a0.string().min(2).max(128);
|
||||
object9.state_url = a0.string().uri().min(1).max(256);
|
||||
object9.details = a0.string().min(2).max(128);
|
||||
object9.details_url = a0.string().uri().min(1).max(256);
|
||||
const value18 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
const keys3 = value18.keys;
|
||||
const object10 = {};
|
||||
object10.start = a0.number().min(1);
|
||||
object10.end = a0.number().min(1);
|
||||
object9.timestamps = Reflect.apply(keys3, value18, [object10]);
|
||||
const value21 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
const keys4 = value21.keys;
|
||||
const object11 = {};
|
||||
object11.large_image = a0.string().min(1).max(300);
|
||||
object11.large_text = a0.string().min(2).max(128);
|
||||
object11.large_url = a0.string().uri().min(1).max(256);
|
||||
object11.small_image = a0.string().min(1).max(300);
|
||||
object11.small_text = a0.string().min(2).max(128);
|
||||
object11.small_url = a0.string().uri().min(1).max(256);
|
||||
object11.invite_cover_image = a0.string().min(1).max(300);
|
||||
object9.assets = Reflect.apply(keys4, value21, [object11]);
|
||||
const value38 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
const keys5 = value38.keys;
|
||||
const object12 = {};
|
||||
object12.id = a0.string().min(2).max(128);
|
||||
const value41 = a0.array();
|
||||
let items2 = value41.items;
|
||||
const value42 = a0.number();
|
||||
object12.size = Reflect.apply(items2, value41, [value42.min(0)]).length(2);
|
||||
const value44 = a0.number();
|
||||
let PRIVATE = ActivityPartyPrivacy.PRIVATE;
|
||||
const value45 = value44.default(PRIVATE);
|
||||
let valid = value45.valid;
|
||||
PRIVATE = ActivityPartyPrivacy.PRIVATE;
|
||||
const PUBLIC = ActivityPartyPrivacy.PUBLIC;
|
||||
object12.privacy = Reflect.apply(valid, value45, [[PRIVATE, PUBLIC]]);
|
||||
object9.party = Reflect.apply(keys5, value38, [object12]);
|
||||
const value46 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
const keys6 = value46.keys;
|
||||
const object13 = {};
|
||||
object13.match = a0.string().min(2).max(128);
|
||||
object13.join = a0.string().min(2).max(128);
|
||||
object13.spectate = a0.string().min(2).max(128);
|
||||
object9.secrets = Reflect.apply(keys6, value46, [object13]);
|
||||
const value53 = a0.array();
|
||||
items2 = value53.items;
|
||||
const value54 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
const keys7 = value54.keys;
|
||||
const object14 = {};
|
||||
object14.label = a0.string().min(1).max(32).required();
|
||||
object14.url = a0.string().uri().min(1).max(512).required();
|
||||
object9.buttons = Reflect.apply(items2, value53, [Reflect.apply(keys7, value54, [object14])]).min(1).max(2);
|
||||
object9.instance = a0.boolean();
|
||||
const value64 = a0.array();
|
||||
items2 = value64.items;
|
||||
const value66 = a0.string().min(1);
|
||||
object9.supported_platforms = Reflect.apply(items2, value64, [value66.max(32)]).min(1).max(10);
|
||||
const value69 = a0.number();
|
||||
let PLAYING = ActivityTypes.PLAYING;
|
||||
const value70 = value69.default(PLAYING);
|
||||
valid = value70.valid;
|
||||
PLAYING = ActivityTypes.PLAYING;
|
||||
const LISTENING = ActivityTypes.LISTENING;
|
||||
const WATCHING = ActivityTypes.WATCHING;
|
||||
const COMPETING = ActivityTypes.COMPETING;
|
||||
object9.type = Reflect.apply(valid, value70, [PLAYING, LISTENING, WATCHING, COMPETING]);
|
||||
const value72 = a0.number().optional();
|
||||
valid = value72.valid;
|
||||
const {NAME, STATE, DETAILS} = (require(8844) /* metro dependency 8844: StatusDisplayTypes */).StatusDisplayTypes;
|
||||
object9.status_display_type = Reflect.apply(valid, value72, [NAME, STATE, DETAILS]);
|
||||
object8.activity = Reflect.apply(keys2, value5, [object9]).allow(null);
|
||||
return Reflect.apply(keys, value3, [object8]);
|
||||
}
|
||||
|
||||
function handler_99545({socket, args, isSocketConnected}) { // fn#99545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13230:1903, offset: 0x021cd259, size: 1551 bytes, params: 2, frame: 32
|
||||
var r8;
|
||||
var r12;
|
||||
var privacy;
|
||||
var r14;
|
||||
var r5;
|
||||
var prototype;
|
||||
var name;
|
||||
var application;
|
||||
var id;
|
||||
var value5;
|
||||
var getApplication;
|
||||
var value6;
|
||||
var instance;
|
||||
var party;
|
||||
var moduleValue;
|
||||
var computeActivityFlags;
|
||||
var value8;
|
||||
var moduleValue2;
|
||||
var canLaunchFrame;
|
||||
var canLaunchFrame2;
|
||||
var activityFlags;
|
||||
var value9;
|
||||
var assets;
|
||||
var secrets;
|
||||
var timestamps;
|
||||
var buttons;
|
||||
var PLAYING;
|
||||
var value11;
|
||||
var defaultImport2;
|
||||
var intersection;
|
||||
var length;
|
||||
var binding;
|
||||
var defaultImport3;
|
||||
var uniq;
|
||||
var length2;
|
||||
var map;
|
||||
var Object;
|
||||
var keys;
|
||||
var value13;
|
||||
var property;
|
||||
var Date;
|
||||
var now;
|
||||
var value14;
|
||||
var toString;
|
||||
var property2;
|
||||
var length3;
|
||||
var Math;
|
||||
var floor;
|
||||
var property3;
|
||||
var Millis;
|
||||
var SECOND;
|
||||
var value15;
|
||||
var fetchAssetIds;
|
||||
var large_image;
|
||||
var small_image;
|
||||
var invite_cover_image;
|
||||
var Error;
|
||||
var error;
|
||||
const pid = args.pid;
|
||||
const activity = args.activity;
|
||||
let value = undefined;
|
||||
const IPC = TransportTypes.IPC;
|
||||
let object = [IPC];
|
||||
const WEBSOCKET = TransportTypes.WEBSOCKET;
|
||||
object[1] = WEBSOCKET;
|
||||
const POST_MESSAGE = TransportTypes.POST_MESSAGE;
|
||||
object[2] = POST_MESSAGE;
|
||||
let includes = object.includes;
|
||||
if (Reflect.apply(includes, object, [socket.transport])) {
|
||||
if (pid == null) {
|
||||
reducibleJoin4: while (true) {
|
||||
if (TransportTypes.IPC === socket.transport) {
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
value = new value({errorCode: RPCErrors.INVALID_COMMAND}, 'nonzero pid required');
|
||||
throw value;
|
||||
}
|
||||
break reducibleJoin4;
|
||||
}
|
||||
}
|
||||
if (activity == null) {
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOCAL_ACTIVITY_UPDATE',
|
||||
socketId: socket.id, pid: pid, activity: activity});
|
||||
return global.Promise.resolve(activity);
|
||||
}
|
||||
object = {};
|
||||
name = activity.name;
|
||||
reducibleJoin7: while (true) {
|
||||
if (name) {
|
||||
break reducibleJoin7;
|
||||
}
|
||||
application = socket.application;
|
||||
name = application.name;
|
||||
activity.name = name;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
application = socket.application;
|
||||
id = application.id;
|
||||
activity.application_id = id;
|
||||
value5 = socket.transport === TransportTypes.POST_MESSAGE;
|
||||
r8 = value5 ? ActivityGamePlatforms.EMBEDDED : ActivityGamePlatforms.DESKTOP;
|
||||
activity.platform = r8;
|
||||
getApplication = ApplicationStore.getApplication;
|
||||
r8 = id ?? value;
|
||||
value6 = Reflect.apply(getApplication, ApplicationStore, [r8]);
|
||||
instance = activity.instance;
|
||||
r12 = instance != null && instance;
|
||||
party = activity.party;
|
||||
reducibleJoin14: while (true) {
|
||||
if (party == null) {
|
||||
privacy = value;
|
||||
break reducibleJoin14;
|
||||
}
|
||||
privacy = party.privacy;
|
||||
break reducibleJoin14;
|
||||
}
|
||||
delete activity.instance;
|
||||
party = activity.party;
|
||||
reducibleJoin16: while (true) {
|
||||
if (party == null) {
|
||||
break reducibleJoin16;
|
||||
}
|
||||
delete party.privacy;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
moduleValue = require(6884) /* metro dependency 6884: ActivityFlagUtils */;
|
||||
computeActivityFlags = moduleValue.computeActivityFlags;
|
||||
value8 = value6 != null;
|
||||
reducibleJoin18: while (true) {
|
||||
if (value8) {
|
||||
moduleValue2 = require(8045) /* metro dependency 8045: canLaunchFrame */;
|
||||
canLaunchFrame = moduleValue2.canLaunchFrame;
|
||||
canLaunchFrame2 = Reflect.apply(canLaunchFrame, moduleValue2, [value6]);
|
||||
r8 = canLaunchFrame2;
|
||||
break reducibleJoin18;
|
||||
}
|
||||
r8 = value8;
|
||||
break reducibleJoin18;
|
||||
}
|
||||
r8 = r8 && value5;
|
||||
activityFlags = Reflect.apply(computeActivityFlags, moduleValue, [activity, r12, value5, r8, privacy]);
|
||||
value9 = 0;
|
||||
reducibleJoin21: while (true) {
|
||||
if (activityFlags > value9) {
|
||||
activity.flags = activityFlags;
|
||||
break reducibleJoin21;
|
||||
}
|
||||
break reducibleJoin21;
|
||||
}
|
||||
assets = activity.assets;
|
||||
party = activity.party;
|
||||
secrets = activity.secrets;
|
||||
timestamps = activity.timestamps;
|
||||
buttons = activity.buttons;
|
||||
reducibleJoin23: while (true) {
|
||||
if (activity.type != null) {
|
||||
break reducibleJoin23;
|
||||
}
|
||||
PLAYING = ActivityTypes.PLAYING;
|
||||
activity.type = PLAYING;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
if (secrets != null) {
|
||||
value11 = (importDefault(22) /* metro dependency 22 */).values(secrets).filter(function(a0) {
|
||||
return !!a0;
|
||||
});
|
||||
reducibleJoin30: while (true) {
|
||||
reducibleJoin28: while (true) {
|
||||
if (party == null) {
|
||||
break reducibleJoin28;
|
||||
}
|
||||
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
intersection = defaultImport2.intersection;
|
||||
id = party.id;
|
||||
length = Reflect.apply(intersection, defaultImport2, [value11, [id]]).length;
|
||||
if (length > value9) {
|
||||
binding = env0_10;
|
||||
includes = binding.includes;
|
||||
application = socket.application;
|
||||
id = application.id;
|
||||
if (!Reflect.apply(includes, binding, [id])) {
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
value = new value({errorCode: RPCErrors.INVALID_ACTIVITY_SECRET},
|
||||
'secrets cannot match the party id');
|
||||
throw value;
|
||||
}
|
||||
break reducibleJoin28;
|
||||
}
|
||||
break reducibleJoin28;
|
||||
}
|
||||
defaultImport3 = importDefault(22) /* metro dependency 22 */;
|
||||
uniq = defaultImport3.uniq;
|
||||
length = Reflect.apply(uniq, defaultImport3, [value11]).length;
|
||||
length2 = value11.length;
|
||||
if (length < length2) {
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
value = new value({errorCode: RPCErrors.INVALID_ACTIVITY_SECRET}, 'secrets must be unique');
|
||||
throw value;
|
||||
}
|
||||
if (buttons != null) {
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
value = new value({errorCode: RPCErrors.INVALID_ACTIVITY_SECRET},
|
||||
'secrets cannot currently be sent with buttons');
|
||||
throw value;
|
||||
}
|
||||
break reducibleJoin30;
|
||||
}
|
||||
}
|
||||
reducibleJoin32: while (true) {
|
||||
if (buttons == null) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
map = buttons.map;
|
||||
object.button_urls = Reflect.apply(map, buttons, [_fun99547]);
|
||||
map = buttons.map;
|
||||
activity.buttons = Reflect.apply(map, buttons, [_fun99548]);
|
||||
break reducibleJoin32;
|
||||
}
|
||||
activity.metadata = object;
|
||||
reducibleJoin37: while (true) {
|
||||
if (timestamps == null) {
|
||||
break reducibleJoin37;
|
||||
}
|
||||
Object = global.Object;
|
||||
keys = Object.keys;
|
||||
value13 = Reflect.apply(keys, Object, [timestamps]);
|
||||
length = value13.length;
|
||||
if (!(value9 < length)) {
|
||||
break reducibleJoin37;
|
||||
}
|
||||
r14 = value9;
|
||||
reducibleLoop34: while (true) {
|
||||
property = value13[r14];
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
value14 = Reflect.apply(now, Date, []);
|
||||
toString = value14.toString;
|
||||
length = Reflect.apply(toString, value14, []).length;
|
||||
property2 = timestamps[property];
|
||||
toString = property2.toString;
|
||||
length3 = Reflect.apply(toString, property2, []).length;
|
||||
reducibleJoin36: while (true) {
|
||||
if (length - length3 > 2) {
|
||||
Math = global.Math;
|
||||
floor = Math.floor;
|
||||
property3 = timestamps[property];
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
SECOND = Millis.SECOND;
|
||||
timestamps[property] = Reflect.apply(floor, Math, [property3 * SECOND]);
|
||||
break reducibleJoin36;
|
||||
}
|
||||
break reducibleJoin36;
|
||||
}
|
||||
value15 = typeof r14 === 'bigint' ? r14 + 1n : +r14 + 1;
|
||||
length = value13.length;
|
||||
if (value15 < length) {
|
||||
r14 = value15;
|
||||
continue reducibleLoop34;
|
||||
}
|
||||
break reducibleJoin37;
|
||||
}
|
||||
}
|
||||
if (assets == null) {
|
||||
r5 = global.Promise.resolve([]);
|
||||
} else {
|
||||
application = socket.application;
|
||||
reducibleJoin43: while (true) {
|
||||
reducibleJoin41: while (true) {
|
||||
if (application == null) {
|
||||
break reducibleJoin41;
|
||||
}
|
||||
application = socket.application;
|
||||
id = application.id;
|
||||
if (id == null) {
|
||||
break reducibleJoin41;
|
||||
}
|
||||
value = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
|
||||
fetchAssetIds = value.fetchAssetIds;
|
||||
application = socket.application;
|
||||
id = application.id;
|
||||
large_image = assets.large_image;
|
||||
small_image = assets.small_image;
|
||||
invite_cover_image = assets.invite_cover_image;
|
||||
value = Reflect.apply(fetchAssetIds, value, [id, [large_image, small_image, invite_cover_image]]);
|
||||
r5 = value;
|
||||
break reducibleJoin43;
|
||||
}
|
||||
Error = global.Error;
|
||||
prototype = Error.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Error}});
|
||||
error = new Error();
|
||||
value = error instanceof Object ? error : value;
|
||||
throw value;
|
||||
}
|
||||
}
|
||||
return r5.then(_fun99549);
|
||||
}
|
||||
value = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
const INVALID_COMMAND = RPCErrors.INVALID_COMMAND;
|
||||
value = new value({errorCode: INVALID_COMMAND}, 'command not available from "' + socket.transport + '" transport');
|
||||
throw value;
|
||||
}
|
||||
|
||||
function _fun99549(a0) { // fn#99549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13230:3811, offset: 0x021cd868, size: 704 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var r1;
|
||||
var r3;
|
||||
var r2;
|
||||
var r7;
|
||||
var item3;
|
||||
var value3;
|
||||
var item4;
|
||||
var value4;
|
||||
var value6;
|
||||
var defaultImport;
|
||||
var dispatch;
|
||||
var object2;
|
||||
var socketBinding;
|
||||
var id;
|
||||
var activityBinding;
|
||||
var secrets;
|
||||
var party;
|
||||
var details;
|
||||
var value7;
|
||||
const iterator = a0[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
let value = undefined;
|
||||
const value2 = item2 === value;
|
||||
const r4 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r1 = value2;
|
||||
r3 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r1 = value3;
|
||||
r3 = value;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = value3;
|
||||
r3 = item;
|
||||
}
|
||||
}
|
||||
if (r1) {
|
||||
r2 = value;
|
||||
} else {
|
||||
item4 = Reflect.apply(iterator2, r0, []);
|
||||
item = item4.value;
|
||||
item4 = item4.done ? undefined : r0;
|
||||
value4 = item4 === value;
|
||||
if (value4) {
|
||||
r0 = item4;
|
||||
r1 = value4;
|
||||
r2 = value;
|
||||
} else {
|
||||
r0 = item4;
|
||||
r1 = value4;
|
||||
r2 = item;
|
||||
}
|
||||
}
|
||||
if (!r1) {
|
||||
r0.return();
|
||||
}
|
||||
if (assets != null) {
|
||||
if (r4 != null) {
|
||||
assets.large_image = r4;
|
||||
} else {
|
||||
delete assets.large_image;
|
||||
}
|
||||
if (r3 != null) {
|
||||
assets.small_image = r3;
|
||||
} else {
|
||||
delete assets.small_image;
|
||||
}
|
||||
if (r2 != null) {
|
||||
assets.invite_cover_image = r2;
|
||||
} else {
|
||||
delete assets.invite_cover_image;
|
||||
}
|
||||
}
|
||||
if (isSocketConnected()) {
|
||||
value6 = environment.__proto__;
|
||||
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatch = defaultImport.dispatch;
|
||||
socketBinding = socket;
|
||||
id = socketBinding.id;
|
||||
activityBinding = activity;
|
||||
Reflect.apply(dispatch, defaultImport, [{type: 'LOCAL_ACTIVITY_UPDATE', socketId: id, pid: pid,
|
||||
activity: activityBinding, partyPrivacy: privacy}]);
|
||||
secrets = activityBinding.secrets;
|
||||
party = activityBinding.party;
|
||||
object2 = {};
|
||||
id = socketBinding.application.id;
|
||||
object2.application_id = id;
|
||||
object2.type = activityBinding.type;
|
||||
object2.name = activityBinding.name;
|
||||
object2.status_display_type = activityBinding.status_display_type;
|
||||
details = activityBinding.details;
|
||||
value7 = '';
|
||||
object2.details = details ?? value7;
|
||||
r7 = activity.state ?? value7;
|
||||
object2.state = r7;
|
||||
r7 = activity.state_url != null || activity.details_url != null;
|
||||
r7 = !r7 ? (activity.assets == null ? value : activity.assets.large_url) != null : r7;
|
||||
r7 = !r7 ? (activity.assets == null ? value : activity.assets.small_url) != null : r7;
|
||||
object2.has_urls = r7;
|
||||
if (secrets != null) {
|
||||
object2.has_match_secret = !!secrets.match;
|
||||
object2.has_join_secret = !!secrets.join;
|
||||
}
|
||||
if (assets != null) {
|
||||
r3 = assets.large_image || assets.small_image;
|
||||
r3 = !r3 ? assets.invite_cover_image : r3;
|
||||
object2.has_images = !!r3;
|
||||
}
|
||||
if (party != null) {
|
||||
object2.party_max = party.size != null && party.size[1] > 0 ? party.size[1] : value;
|
||||
object2.party_id = party.id;
|
||||
}
|
||||
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
value.track(AnalyticEvents.ACTIVITY_UPDATED, object2);
|
||||
return activity;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 13041; source: modules/rpc/server/commands/setOrientationLockState.tsx; dependencies: [4237, 482, 8079, 694, 8076, 2] */
|
||||
function _fun99550(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13231:6, offset: 0x021cdb28, size: 180 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(4237) /* metro dependency 4237: Constants */).OrientationLockState;
|
||||
const constantsModule = require(482) /* metro dependency 482: Constants */;
|
||||
const RPCCommands = constantsModule.RPCCommands;
|
||||
const env0_3 = constantsModule.RPCErrors;
|
||||
object2 = {};
|
||||
const SET_ORIENTATION_LOCK_STATE = RPCCommands.SET_ORIENTATION_LOCK_STATE;
|
||||
object2[SET_ORIENTATION_LOCK_STATE] = {validation: validation_99551, handler: handler_99552};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/setOrientationLockState.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validation_99551(a0) { // fn#99551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13231:213, offset: 0x021cdbdc, size: 253 bytes, params: 2, frame: 20
|
||||
var value;
|
||||
const value3 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0).required();
|
||||
const keys = value3.keys;
|
||||
const object2 = {};
|
||||
const value4 = a0.number();
|
||||
let valid = value4.valid;
|
||||
let UNLOCKED = OrientationLockState.UNLOCKED;
|
||||
let PORTRAIT = OrientationLockState.PORTRAIT;
|
||||
let LANDSCAPE = OrientationLockState.LANDSCAPE;
|
||||
object2.lock_state = Reflect.apply(valid, value4, [UNLOCKED, PORTRAIT, LANDSCAPE]).required();
|
||||
valid = a0.number().valid;
|
||||
UNLOCKED = OrientationLockState.UNLOCKED;
|
||||
PORTRAIT = OrientationLockState.PORTRAIT;
|
||||
LANDSCAPE = OrientationLockState.LANDSCAPE;
|
||||
value = Reflect.apply(valid, value, [UNLOCKED, PORTRAIT, LANDSCAPE]);
|
||||
value = value.allow(null);
|
||||
object2.picture_in_picture_lock_state = value.optional();
|
||||
valid = a0.number().valid;
|
||||
UNLOCKED = OrientationLockState.UNLOCKED;
|
||||
PORTRAIT = OrientationLockState.PORTRAIT;
|
||||
LANDSCAPE = OrientationLockState.LANDSCAPE;
|
||||
value = Reflect.apply(valid, value, [UNLOCKED, PORTRAIT, LANDSCAPE]);
|
||||
value = value.allow(null);
|
||||
object2.grid_lock_state = value.optional();
|
||||
return Reflect.apply(keys, value3, [object2]);
|
||||
}
|
||||
|
||||
function handler_99552({socket, args}) { // fn#99552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13231:516, offset: 0x021cdcd9, size: 235 bytes, params: 2, frame: 21
|
||||
const lock_state = args.lock_state;
|
||||
const picture_in_picture_lock_state = args.picture_in_picture_lock_state;
|
||||
const grid_lock_state = args.grid_lock_state;
|
||||
const id = socket.application.id;
|
||||
if (id == null) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_COMMAND},
|
||||
'No application.');
|
||||
}
|
||||
let value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.dispatch({type: 'FRAME_SET_ORIENTATION_LOCK_STATE', applicationId: id, lockState: lock_state,
|
||||
pictureInPictureLockState: picture_in_picture_lock_state});
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.dispatch({type: 'EMBEDDED_ACTIVITY_SET_ORIENTATION_LOCK_STATE', applicationId: id, lockState: lock_state,
|
||||
pictureInPictureLockState: picture_in_picture_lock_state, gridLockState: grid_lock_state});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/* Metro module 13055; source: modules/rpc/server/commands/soundboard.tsx; dependencies: [5, 4613, 1878, 4135, 482, 4122, 6944, 6639, 8079, 6980, 6951, 8076, 6982, 6789, 2] */
|
||||
function _fun99677(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13245:6, offset: 0x021d11fe, size: 385 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const soundboardStore = importDefault(4613) /* metro dependency 4613: SoundboardStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(4135) /* metro dependency 4135: Constants */;
|
||||
const RPC_LOCAL_SCOPE = value.RPC_LOCAL_SCOPE;
|
||||
const RPC_SCOPE_CONFIG = value.RPC_SCOPE_CONFIG;
|
||||
value = require(482) /* metro dependency 482: Constants */;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const env0_6 = value.RPCErrors;
|
||||
object2 = {};
|
||||
const GET_SOUNDBOARD_SOUNDS = RPCCommands.GET_SOUNDBOARD_SOUNDS;
|
||||
const ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
let RPC = OAuth2Scopes.RPC;
|
||||
object2[GET_SOUNDBOARD_SOUNDS] = {scope: {[ANY]: [RPC, RPC_LOCAL_SCOPE]}, handler: handler_99678};
|
||||
const PLAY_SOUNDBOARD_SOUND = RPCCommands.PLAY_SOUNDBOARD_SOUND;
|
||||
const ALL = RPC_SCOPE_CONFIG.ALL;
|
||||
RPC = OAuth2Scopes.RPC;
|
||||
const RPC_VOICE_WRITE = OAuth2Scopes.RPC_VOICE_WRITE;
|
||||
object2[PLAY_SOUNDBOARD_SOUND] = {scope: {[ALL]: [RPC, RPC_VOICE_WRITE]}, validation: validation_99683,
|
||||
handler: handler_99684};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/soundboard.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function handler_99678() { // fn#99678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13245:300, offset: 0x021d137f, size: 29 bytes, params: 1, frame: 11
|
||||
return env0_3(_fun99680)();
|
||||
}
|
||||
|
||||
function validation_99683(a0) { // fn#99683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13245:592, offset: 0x021d1463, size: 84 bytes, params: 2, frame: 13
|
||||
let value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys = value.keys;
|
||||
const object2 = {};
|
||||
object2.guild_id = a0.string();
|
||||
object2.sound_id = a0.string();
|
||||
return Reflect.apply(keys, value, [object2]);
|
||||
}
|
||||
|
||||
function handler_99684({args}) { // fn#99684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13245:673, offset: 0x021d14b7, size: 57 bytes, params: 2, frame: 11
|
||||
const env0_0 = args.guild_id;
|
||||
const env0_1 = args.sound_id;
|
||||
return env0_3(_fun99686)();
|
||||
}
|
||||
|
||||
function* _fun99680() { // fn#99680, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13245:307, offset: 0x021d13a7, size: 106 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const value3 = env2_0(env2_2[6]);
|
||||
yield value3.maybeFetchSoundboardSounds();
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
env2_4.getSounds().forEach(function(a0) {
|
||||
return a0.forEach(_fun99682);
|
||||
});
|
||||
return [];
|
||||
}
|
||||
|
||||
function* _fun99686() { // fn#99686, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13245:710, offset: 0x021d14fb, size: 486 bytes, params: 1, frame: 23
|
||||
var binding3;
|
||||
var value17;
|
||||
var playSound;
|
||||
var id;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
let binding = env2_0;
|
||||
const value3 = binding(env2_2[6]);
|
||||
yield value3.maybeFetchSoundboardSounds();
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const currentUser = env2_5.getCurrentUser();
|
||||
const sound = env2_4.getSound(require, importDefault);
|
||||
const value9 = env2_1(env2_2[9])();
|
||||
const r6 = sound != null && currentUser != null && env2_0(env2_2[10]).canUseSoundboardSound(currentUser, sound,
|
||||
value9);
|
||||
if (value9 == null) {
|
||||
throw new env2_1(env2_2[11])({errorCode: env2_6.INVALID_CHANNEL}, 'Invalid Channel.');
|
||||
}
|
||||
binding = env2_1;
|
||||
const binding2 = env2_2;
|
||||
if (r6) {
|
||||
if (binding(binding2[12])(value9)) {
|
||||
if (sound != null) {
|
||||
binding = env2_0;
|
||||
binding3 = env2_2;
|
||||
value17 = binding(binding3[10]);
|
||||
playSound = value17.playSound;
|
||||
id = value9.id;
|
||||
binding = env2_1;
|
||||
Reflect.apply(playSound, value17, [sound, id, [binding(binding3[13]).RPC]]);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_1;
|
||||
throw new binding(env2_2[11])({errorCode: env2_6.INVALID_PERMISSIONS}, 'Invalid Permissions.');
|
||||
}
|
||||
const value13 = binding(binding2[11]);
|
||||
const INVALID_SOUND = env2_6.INVALID_SOUND;
|
||||
throw new value13({errorCode: INVALID_SOUND}, 'Invalid Sound.');
|
||||
}
|
||||
|
||||
function _fun99681(a0) { // fn#99681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13245:405, offset: 0x021d1411, size: 24 bytes, params: 2, frame: 11
|
||||
return a0.forEach(_fun99682);
|
||||
}
|
||||
|
||||
function _fun99682(a0) { // fn#99682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13245:419, offset: 0x021d1429, size: 58 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_0;
|
||||
const push = binding.push;
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
value = env4_0(env4_2[7]);
|
||||
return Reflect.apply(push, binding, [value.soundboardSoundToAPI(a0)]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,280 @@
|
||||
/* Metro module 13042; source: modules/rpc/server/commands/store.tsx; dependencies: [5, 4135, 661, 13043, 13044, 8076, 7502, 7500, 13045, 5182, 2] */
|
||||
function _fun99553(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:6, offset: 0x021cddc4, size: 435 bytes, params: 8, frame: 27
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const getSubscriptionSkusViaListings = function() {
|
||||
return _getSubscriptionSkusViaListings.apply(this, arguments);
|
||||
};
|
||||
const closure = function() {
|
||||
return _getSkusHandler.apply(this, arguments);
|
||||
};
|
||||
const closure2 = getEntitlementsHandler;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
let value = require(4135) /* metro dependency 4135: Constants */;
|
||||
const RPC_AUTHENTICATED_SCOPE = value.RPC_AUTHENTICATED_SCOPE;
|
||||
const RPC_LOCAL_SCOPE = value.RPC_LOCAL_SCOPE;
|
||||
const RPC_SCOPE_CONFIG = value.RPC_SCOPE_CONFIG;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.CurrencyCodes;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const env0_6 = value.RPCErrors;
|
||||
const env0_7 = value.SKUTypes;
|
||||
object2 = {};
|
||||
const GET_SKUS = RPCCommands.GET_SKUS;
|
||||
let ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
object2[GET_SKUS] = {[ANY]: [RPC_AUTHENTICATED_SCOPE, RPC_LOCAL_SCOPE], ['handler']: closure};
|
||||
const GET_ENTITLEMENTS = RPCCommands.GET_ENTITLEMENTS;
|
||||
ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
object2[GET_ENTITLEMENTS] = {[ANY]: [RPC_AUTHENTICATED_SCOPE, RPC_LOCAL_SCOPE], ['handler']: closure2};
|
||||
const GET_SKUS_EMBEDDED = RPCCommands.GET_SKUS_EMBEDDED;
|
||||
ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
object2[GET_SKUS_EMBEDDED] = {[ANY]: [RPC_AUTHENTICATED_SCOPE, RPC_LOCAL_SCOPE], ['handler']: handler_99579};
|
||||
const GET_ENTITLEMENTS_EMBEDDED = RPCCommands.GET_ENTITLEMENTS_EMBEDDED;
|
||||
ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
object2[GET_ENTITLEMENTS_EMBEDDED] = {[ANY]: [RPC_AUTHENTICATED_SCOPE, RPC_LOCAL_SCOPE], ['handler']: handler_99582};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/store.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function _getSubscriptionSkusViaListings() { // fn#99555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:359, offset: 0x021cdf77, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun99557).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _getSkusHandler() { // fn#99570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:1329, offset: 0x021ce253, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun99572).apply(this, arguments);
|
||||
}
|
||||
|
||||
function getEntitlementsHandler({socket}) { // fn#99578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:1981, offset: 0x021ce4a6, size: 168 bytes, params: 2, frame: 15
|
||||
const validateTransportTypeModule = require(13044) /* metro dependency 13044: validateTransportType */;
|
||||
validateTransportTypeModule.validateTransportType(socket.transport);
|
||||
const id = socket.application.id;
|
||||
if (id == null) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_COMMAND},
|
||||
'No application.');
|
||||
}
|
||||
return (importAll(5182) /* metro dependency 5182: EntitlementActionCreators */).fetchUserEntitlementsForApplication(id);
|
||||
}
|
||||
|
||||
function handler_99579(a0) { // fn#99579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:2396, offset: 0x021ce54e, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return env0_4(_fun99581)();
|
||||
}
|
||||
|
||||
function handler_99582(a0) { // fn#99582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:2510, offset: 0x021ce5b3, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return env0_4(_fun99584)();
|
||||
}
|
||||
|
||||
function* _fun99557(a0, a1) { // fn#99557, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:444, offset: 0x021cdfb4, size: 130 bytes, params: 3, frame: 16
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
value = a1.filter(_fun99558);
|
||||
const Promise = global.Promise;
|
||||
yield Promise.all(value.map(_fun99559()));
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
value.forEach(function(a0) {
|
||||
if (a0 == null) {
|
||||
return null;
|
||||
}
|
||||
var subscription_listings = a0.subscription_listings;
|
||||
if (subscription_listings == null) {
|
||||
return null;
|
||||
}
|
||||
subscription_listings.forEach(_fun99564);
|
||||
[].filter(_fun99567).forEach(_fun99568);
|
||||
});
|
||||
return [];
|
||||
}
|
||||
|
||||
async function _fun99572({socket}) { // fn#99572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:1382, offset: 0x021ce299, size: 475 bytes, params: 2, frame: 24
|
||||
var environment;
|
||||
var items;
|
||||
var value14;
|
||||
var value15;
|
||||
var value18;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
let binding = env2_0;
|
||||
const value4 = binding(env2_3[4]);
|
||||
value4.validateTransportType(socket.transport);
|
||||
const id = socket.application.id;
|
||||
if (id == null) {
|
||||
throw new env2_1(env2_3[5])({errorCode: env2_6.INVALID_COMMAND}, 'No application.');
|
||||
}
|
||||
const isTestModeForApplication2 = env2_0(env2_3[6]).isTestModeForApplication(id);
|
||||
binding = env2_2;
|
||||
const binding2 = env2_3;
|
||||
if (isTestModeForApplication2) {
|
||||
value14 = binding(binding2[7]);
|
||||
await value14.fetchTestSKUsForApplication(id, false);
|
||||
value15 = undefined;
|
||||
if (false) {
|
||||
return value15;
|
||||
}
|
||||
await env2_8(id, value15);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
value18 = value15.filter(function(a0) {
|
||||
return a0.price != null;
|
||||
});
|
||||
items = [];
|
||||
arraySpread(items, value, arraySpread(items, value18, 0, undefined), undefined);
|
||||
} else {
|
||||
var value6 = binding(binding2[8]);
|
||||
await value6.fetchAllStoreListingsForApplication(id);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
var value9 = undefined.filter(_fun99574);
|
||||
var map = value9.map;
|
||||
var value11 = Reflect.apply(map, value9, [function(a0) {
|
||||
return a0.sku;
|
||||
}]).filter(function(a0) {
|
||||
return a0.price != null;
|
||||
});
|
||||
items = [];
|
||||
var value12 = arraySpread(items, value11, 0, undefined);
|
||||
binding = env2_8;
|
||||
map = undefined.map;
|
||||
await binding(id, Reflect.apply(map, undefined, [function(a0) {
|
||||
return a0.sku;
|
||||
}]));
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
arraySpread(items, value, value12, map);
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
function* _fun99581() { // fn#99581, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:2402, offset: 0x021ce57d, size: 54 bytes, params: 1, frame: 13
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const binding = env2_10;
|
||||
value = environment.__proto__;
|
||||
yield binding(require);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
return {skus: value};
|
||||
}
|
||||
|
||||
function* _fun99584() { // fn#99584, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:2516, offset: 0x021ce5e2, size: 54 bytes, params: 1, frame: 13
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const binding = env2_12;
|
||||
value = environment.__proto__;
|
||||
yield binding(require);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
return {entitlements: value};
|
||||
}
|
||||
|
||||
function _fun99558({type}) { // fn#99558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:475, offset: 0x021ce036, size: 27 bytes, params: 2, frame: 2
|
||||
const SUBSCRIPTION_GROUP = env3_7.SUBSCRIPTION_GROUP;
|
||||
return type === SUBSCRIPTION_GROUP;
|
||||
}
|
||||
|
||||
function _fun99559() { // fn#99559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:536, offset: 0x021ce051, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env3_4(_fun99561);
|
||||
return _fun99562;
|
||||
}
|
||||
|
||||
function _fun99563(a0) { // fn#99563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:726, offset: 0x021ce0ce, size: 88 bytes, params: 2, frame: 14
|
||||
if (a0 == null) {
|
||||
return null;
|
||||
}
|
||||
const subscription_listings = a0.subscription_listings;
|
||||
if (subscription_listings == null) {
|
||||
return null;
|
||||
}
|
||||
subscription_listings.forEach(function(a0) {
|
||||
var env0_0 = a0;
|
||||
a0.subscription_plans.forEach(_fun99565);
|
||||
});
|
||||
[].filter(function(a0) {
|
||||
return a0?.price != null;
|
||||
}).forEach(_fun99568);
|
||||
}
|
||||
|
||||
function _fun99574({sku}) { // fn#99574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:1811, offset: 0x021ce485, size: 33 bytes, params: 2, frame: 2
|
||||
const type = sku.type;
|
||||
const SUBSCRIPTION_GROUP = env3_7.SUBSCRIPTION_GROUP;
|
||||
return type !== SUBSCRIPTION_GROUP;
|
||||
}
|
||||
|
||||
function* _fun99561({id}) { // fn#99561, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:556, offset: 0x021ce080, size: 78 bytes, params: 2, frame: 14
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
||||
value = env5_0(env5_3[3]);
|
||||
yield value.fetchAllSubscriptionListingsDataForApplication(env2_0, id);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun99564(a0) { // fn#99564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:826, offset: 0x021ce126, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
a0.subscription_plans.forEach(_fun99565);
|
||||
}
|
||||
|
||||
function _fun99568(a0) { // fn#99568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:1181, offset: 0x021ce23d, size: 22 bytes, params: 2, frame: 11
|
||||
return env1_2.push(a0);
|
||||
}
|
||||
|
||||
function _fun99565(a0) { // fn#99565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:860, offset: 0x021ce14a, size: 190 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
var object2;
|
||||
var value5;
|
||||
var binding;
|
||||
var release_date;
|
||||
const env0_0 = a0;
|
||||
let value = null;
|
||||
const value2 = undefined;
|
||||
const price = value == a0 ? value2 : a0.price;
|
||||
const value4 = require.find(_fun99566);
|
||||
if (value != value4) {
|
||||
object2 = {};
|
||||
object2.id = a0.sku_id;
|
||||
object2.name = value4.name;
|
||||
object2.type = value4.type;
|
||||
value5 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
||||
object2.price = {amount: price, currency: env5_5.USD};
|
||||
binding = env0_0;
|
||||
object2.application_id = binding.application_id;
|
||||
object2.flags = binding.sku_flags;
|
||||
release_date = value4.release_date;
|
||||
object2.release_date = value != release_date ? release_date : value;
|
||||
value = environment.__proto__;
|
||||
binding = env1_0;
|
||||
binding.push(object2);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun99566({id}) { // fn#99566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13232:905, offset: 0x021ce208, size: 27 bytes, params: 2, frame: 2
|
||||
return id === env0_0.sku_id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/* Metro module 13049; source: modules/rpc/server/commands/subscriptions.tsx; dependencies: [5, 661, 8076, 13050, 683, 13051, 2] */
|
||||
function _fun99657(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13239:6, offset: 0x021d05b1, size: 201 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.AnalyticEvents;
|
||||
const RPCCommands = constantsModule.RPCCommands;
|
||||
const env0_5 = constantsModule.RPCErrors;
|
||||
object2 = {};
|
||||
const SUBSCRIBE = RPCCommands.SUBSCRIBE;
|
||||
object2[SUBSCRIBE] = {handler: function({server, socket, evt, args}) {
|
||||
return args(_fun99659)();
|
||||
}};
|
||||
const UNSUBSCRIBE = RPCCommands.UNSUBSCRIBE;
|
||||
object2[UNSUBSCRIBE] = {handler: handler_99664};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/subscriptions.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function handler_99658({server, socket, evt, args}) { // fn#99658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13239:191, offset: 0x021d067a, size: 72 bytes, params: 2, frame: 11
|
||||
return args(_fun99660)();
|
||||
}
|
||||
|
||||
function handler_99664({server, socket, evt, args}) { // fn#99664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13239:1125, offset: 0x021d0a1e, size: 156 bytes, params: 2, frame: 16
|
||||
var value;
|
||||
var defaultImport;
|
||||
if (server.events[evt] == null) {
|
||||
defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
||||
({}).errorCode = RPCErrors.INVALID_EVENT;
|
||||
value = 'Invalid event: ' + evt;
|
||||
value = new defaultImport();
|
||||
throw value;
|
||||
}
|
||||
server.removeSubscription(socket, evt, args);
|
||||
return {evt: evt};
|
||||
}
|
||||
|
||||
function* _fun99660() { // fn#99660, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13239:230, offset: 0x021d06cd, size: 682 bytes, params: 1, frame: 25
|
||||
var environment;
|
||||
var object2;
|
||||
var value7;
|
||||
var track;
|
||||
var RPC_SUBSCRIPTION_REQUESTED;
|
||||
var value9;
|
||||
var validate;
|
||||
var value11;
|
||||
var handler;
|
||||
var Promise;
|
||||
var promise;
|
||||
var value14;
|
||||
var value15;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
var env0_0;
|
||||
var env0_1;
|
||||
value = environment.__proto__;
|
||||
const property = require.events[dependencyMap];
|
||||
if (property == null) {
|
||||
value14 = environment.__proto__.__proto__;
|
||||
value15 = env2_1(env2_2[2]);
|
||||
value = 'Invalid event: ' + dependencyMap;
|
||||
value = new value15({errorCode: env2_5.INVALID_EVENT}, value);
|
||||
throw value;
|
||||
}
|
||||
const value5 = env2_1(env2_2[3])(importDefault.authorization.scopes, property.scope);
|
||||
let binding = env2_1;
|
||||
const binding2 = env2_2;
|
||||
if (value5) {
|
||||
value7 = binding(binding2[4]);
|
||||
track = value7.track;
|
||||
RPC_SUBSCRIPTION_REQUESTED = env2_4.RPC_SUBSCRIPTION_REQUESTED;
|
||||
object2 = {};
|
||||
object2.event = dependencyMap;
|
||||
object2.scope = typeof property.scope === 'object' ? global.JSON.stringify(property.scope) : property.scope;
|
||||
object2.application_id = importDefault.application.id;
|
||||
object2.socket_scope = importDefault.authorization.scopes.toString();
|
||||
Reflect.apply(track, value7, [RPC_SUBSCRIPTION_REQUESTED, object2]);
|
||||
if (property.validation == null) {
|
||||
handler = property.handler;
|
||||
binding = env1_3;
|
||||
env0_0 = Reflect.apply(handler, property, [{args: binding, socket: importDefault}]);
|
||||
env0_1 = env2_0(env2_2[5]).getInitialSubscriptionPayload(importDefault, dependencyMap, binding);
|
||||
Promise = global.Promise;
|
||||
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
promise = new Promise(function(a0) {
|
||||
global.setImmediate(_fun99662);
|
||||
a0({evt: dependencyMap});
|
||||
});
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
yield require.getJoi();
|
||||
value9 = undefined;
|
||||
if (false) {
|
||||
return value9;
|
||||
}
|
||||
validate = value9.validate;
|
||||
binding = env1_3;
|
||||
value11 = property.validation(value9);
|
||||
object2 = {convert: false};
|
||||
if (Reflect.apply(validate, value9, [binding, value11, object2]).error != null) {
|
||||
value = env2_1(env2_2[2]);
|
||||
value = new value({errorCode: env2_5.INVALID_PAYLOAD}, 'Invalid subscription parameters provided');
|
||||
throw value;
|
||||
}
|
||||
handler = property.handler;
|
||||
binding = env1_3;
|
||||
env0_0 = Reflect.apply(handler, property, [{args: binding, socket: importDefault}]);
|
||||
env0_1 = env2_0(env2_2[5]).getInitialSubscriptionPayload(importDefault, dependencyMap, binding);
|
||||
Promise = global.Promise;
|
||||
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
promise = new Promise(_fun99661);
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
value = binding(binding2[2]);
|
||||
const INVALID_PERMISSIONS = env2_5.INVALID_PERMISSIONS;
|
||||
value = new value({errorCode: INVALID_PERMISSIONS}, 'Not authenticated or invalid scope');
|
||||
throw value;
|
||||
}
|
||||
|
||||
function _fun99661(a0) { // fn#99661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13239:971, offset: 0x021d0977, size: 48 bytes, params: 2, frame: 11
|
||||
global.setImmediate(_fun99662);
|
||||
a0({evt: dependencyMap});
|
||||
}
|
||||
|
||||
function _fun99662() { // fn#99662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13239:989, offset: 0x021d09a7, size: 87 bytes, params: 1, frame: 19
|
||||
require.addSubscription(importDefault, dependencyMap, env3_3, env1_0);
|
||||
if (env1_1 != null) {
|
||||
require.dispatchToSubscriptions(dependencyMap, function(a0) {
|
||||
return a0.socket.id === importDefault.id;
|
||||
}, env1_1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Metro module 13053; source: modules/rpc/server/commands/userSettings.tsx; dependencies: [1949, 661, 4122, 2] */
|
||||
function _fun99673(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13243:6, offset: 0x021d10b1, size: 173 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const RPCCommands = (require(661) /* metro dependency 661: Constants */).RPCCommands;
|
||||
object2 = {};
|
||||
const USER_SETTINGS_GET_LOCALE = RPCCommands.USER_SETTINGS_GET_LOCALE;
|
||||
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
const IDENTIFY = OAuth2Scopes.IDENTIFY;
|
||||
object2[USER_SETTINGS_GET_LOCALE] = {scope: IDENTIFY, handler: function() {
|
||||
return {locale: LocaleStore.locale};
|
||||
}};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/userSettings.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/* Metro module 13052; source: modules/rpc/server/commands/users.tsx; dependencies: [1878, 4135, 661, 13026, 8082, 2] */
|
||||
function _fun99671(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13242:6, offset: 0x021d0f79, size: 242 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(4135) /* metro dependency 4135: Constants */;
|
||||
const RPC_EMBEDDED_APP_SCOPE = value.RPC_EMBEDDED_APP_SCOPE;
|
||||
const RPC_LOCAL_SCOPE = value.RPC_LOCAL_SCOPE;
|
||||
const RPC_SCOPE_CONFIG = value.RPC_SCOPE_CONFIG;
|
||||
const RPCCommands = (require(661) /* metro dependency 661: Constants */).RPCCommands;
|
||||
object2 = {};
|
||||
const GET_USER = RPCCommands.GET_USER;
|
||||
value = require(13026) /* metro dependency 13026: rpcSchema */;
|
||||
const createRPCCommand = value.createRPCCommand;
|
||||
const GET_USER2 = RPCCommands.GET_USER;
|
||||
const ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
object2[GET_USER] = Reflect.apply(createRPCCommand, value, [GET_USER2, {scope: {[ANY]: [RPC_EMBEDDED_APP_SCOPE,
|
||||
RPC_LOCAL_SCOPE]}, handler: handler_99672}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/users.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function handler_99672({args}) { // fn#99672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13242:281, offset: 0x021d106b, size: 70 bytes, params: 2, frame: 13
|
||||
const user = UserStore.getUser(args.id);
|
||||
return user == null ? null : (importDefault(8082) /* metro dependency 8082: transformUser */)(user);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user