decord/alpha/source/modules/activities/utils/getCanJoin.tsx
github-actions ad105f2d59 chore: update source for alpha 348.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4941.js (118.4 MB)
2026-09-21 06:29:48 +00:00

97 lines
3.6 KiB
TypeScript

// Module ID: 12006
// Function ID: 12007
// Name: getCanJoin
// Dependencies: [1074, 12007, 12008, 12009, 12010, 12011, 12012, 12013, 7555, 1364, 2]
// Exports: getCanJoin, getCanSync
// Module 12006 (getCanJoin)
import PlatformUtils from "PlatformUtils" /* 1364 */;
import isInviteActiveDefault from "isInviteActive" /* 12007 */;
import getPartySize from "getPartySize" /* 12008 */;
import Constants from "Constants" /* 1074 */;
import size from "module_2" /* 2 */;
({ ActivityActionTypes: c3, ActivityFlags: closure_4 } = Constants);
const result = size.fileFinishedImporting("modules/activities/utils/getCanJoin.tsx");
export const getCanJoin = function getCanJoin(currentUserId) {
({ presenceActivity, message } = currentUserId);
if (message.author.id === currentUserId.currentUserId) {
return { canJoin: false, remoteJoinPlatform: null };
} else {
if (isInviteActiveDefault(presenceActivity, message, tmp2.id)) {
const partySize = getPartySize.getPartySize(presenceActivity);
if (obj2.hasPartySize(partySize)) {
if (!tmp6Result.isPartyFull(partySize)) {
if (tmp6Result5.getIsInParty(tmp, presenceActivity)) {
return { canJoin: false, remoteJoinPlatform: null };
} else {
if (tmp6Result6.getIsAskToJoin(message)) {
return { canJoin: false, remoteJoinPlatform: null };
} else {
if (tmp3) {
if (tmp4) {
return { canJoin: true, remoteJoinPlatform: null };
}
}
const activity = message.activity;
let type;
if (activity != null) {
type = activity.type;
}
if (type === constants.JOIN) {
if (null != presenceActivity) {
const remoteJoinableActivityPlatform = tmp6(12013).getRemoteJoinableActivityPlatform(presenceActivity);
if (null != remoteJoinableActivityPlatform) {
const obj3 = { canJoin: true, remoteJoinPlatform: remoteJoinableActivityPlatform };
return obj3;
} else if (tmp13(7555)(presenceActivity, constants2.SUPPORTS_JOIN_URL)) {
return { canJoin: true, remoteJoinPlatform: null };
}
const tmp6Result7 = tmp6(12013);
}
}
if (tmp6Result8.platformSupportsActivityJoin()) {
if (tmp5) {
let obj4 = { canJoin: true, remoteJoinPlatform: null };
}
return obj4;
}
obj4 = { canJoin: false, remoteJoinPlatform: null };
tmp6Result8 = tmp6(1364);
}
tmp6Result6 = tmp6(12012);
}
tmp6Result5 = tmp6(12011);
}
tmp6Result = tmp6(12010);
}
return { canJoin: false, remoteJoinPlatform: null };
} else {
return { canJoin: false, remoteJoinPlatform: null };
}
tmp13 = importDefault;
}
};
export const getCanSync = function getCanSync(activity, tmp8Result, arg2, id) {
let tmp = null != activity;
if (tmp) {
let tmp6 = isInviteActiveDefault(activity, arg2, id.id);
if (tmp6) {
let tmp8 = tmp4(7555)(activity, constants2.SYNC);
if (tmp8) {
let isPlatformEmbedded = PlatformUtils.isPlatformEmbedded;
if (isPlatformEmbedded) {
isPlatformEmbedded = !tmp9(12011).getIsInParty(tmp8Result, activity);
const tmp9Result = tmp9(12011);
}
tmp8 = isPlatformEmbedded;
tmp9 = require;
}
tmp6 = tmp8;
}
tmp = tmp6;
tmp4 = importDefault;
}
return tmp;
};