57 lines
3.3 KiB
TypeScript
57 lines
3.3 KiB
TypeScript
/* Metro module 13022; source: modules/rpc/server/commands/config.tsx; dependencies: [4135, 661, 8079, 8076, 694, 2] */
|
|
import Dispatcher from '../../../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import CreateRpcJoiSchemaObject from '../../helpers/createRpcJoiSchemaObject.tsx'; /* Metro dependency 8079 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 4135 */
|
|
|
|
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
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
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;
|
|
object = {};
|
|
const SET_CONFIG = RPCCommands.SET_CONFIG;
|
|
object[SET_CONFIG] = {scope: RPC_AUTHENTICATED_SCOPE, validation: validation_99410, handler: handler_99411};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/rpc/server/commands/config.tsx');
|
|
exports.default = object;
|
|
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 = (CreateRpcJoiSchemaObject)(a0);
|
|
value = value.required();
|
|
const keys = value.keys;
|
|
const object = {};
|
|
object.use_interactive_pip = a0.boolean();
|
|
return Reflect.apply(keys, value, [object]);
|
|
}
|
|
|
|
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');
|
|
}
|
|
(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});
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun99409, 13022, [4135, 661, 8079, 8076, 694,
|
|
2]) /* metro module 13022, dependencies: [4135, 661, 8079, 8076, 694, 2] */;
|