Files
discord-decomp/sources/modules/rpc/helpers/activityInstanceConnectedParticipants.tsx
T
2026-07-27 16:20:00 +03:00

70 lines
3.8 KiB
TypeScript

/* Metro module 13014; source: modules/rpc/helpers/activityInstanceConnectedParticipants.tsx; dependencies: [1378, 1878, 4135, 3774, 4617, 8082, 1360, 22, 2] */
function _fun99364(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13204:6, offset: 0x021c5858, size: 214 bytes, params: 8, frame: 20
var object3;
const env0_0 = require;
const closure = activityInstanceConnectedParticipants;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const {RPC_AUTHENTICATED_SCOPE, RPC_SCOPE_CONFIG} = require(4135) /* metro dependency 4135: Constants */;
object3 = {};
const ANY = RPC_SCOPE_CONFIG.ANY;
object3[ANY] = [RPC_AUTHENTICATED_SCOPE];
const object4 = {scope: object3, handler: function() {
return _fun99368;
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/helpers/activityInstanceConnectedParticipants.tsx');
exports.activityInstanceConnectedParticipants = closure;
exports.activityInstanceConnectedParticipantsScope = object3;
exports.activityInstanceConnectedParticipantsUpdateEvent = object4;
}
function activityInstanceConnectedParticipants() { // fn#99365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13204:175, offset: 0x021c592e, size: 181 bytes, params: 1, frame: 18
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
if (currentEmbeddedActivity == null) {
return {participants: []};
}
const env0_0 = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationGuildId(currentEmbeddedActivity.location);
const env0_1 = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(currentEmbeddedActivity.location);
const object2 = {};
const Array = global.Array;
const from = Array.from;
const userIds = currentEmbeddedActivity.userIds;
const value = Reflect.apply(from, Array, [userIds, _fun99366]);
object2.participants = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
return object2;
}
function handler() { // fn#99367, offset: 0x021c5a63, size: 11 bytes, params: 1, frame: 1
return _fun99368;
}
function _fun99366(a0) { // fn#99366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13204:458, offset: 0x021c59e3, size: 128 bytes, params: 2, frame: 19
var value3;
var moduleValue;
var value5;
var object2;
const user = UserStore.getUser(a0);
if (user != null) {
value3 = undefined;
moduleValue = require(4617) /* metro dependency 4617: NicknameUtils */;
value5 = moduleValue.getNickname(env0_0, env0_1, user);
object2 = {};
copyDataProperties(object2, (importDefault(8082) /* metro dependency 8082: transformUser */)(user), undefined);
object2['nickname'] = value5 ?? value3;
return object2;
}
}
function _fun99368({prevState, dispatch}) { // fn#99368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13204:651, offset: 0x021c5a6e, size: 69 bytes, params: 2, frame: 16
let value = environment.__proto__;
const value2 = activityInstanceConnectedParticipants();
value = importDefault(22) /* metro dependency 22 */;
if (!value.isEqual(value2, prevState)) {
dispatch(value2);
}
return value2;
}