decord/source/modules/activities/utils/getCanJoin.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

99 lines
3.6 KiB
TypeScript

// Module ID: 11758
// Function ID: 11759
// Name: getCanJoin
// Dependencies: [1074, 11759, 11760, 11761, 11762, 11763, 11764, 11765, 7313, 1115, 2]
// Exports: getCanJoin, getCanSync
// Module 11758 (getCanJoin)
import set from "set" /* 2 */;
import set2 from "set" /* 1115 */;
import resultDefault from "result" /* 11759 */;
import getPartySize from "getPartySize" /* 11760 */;
import ME from "ME" /* 1074 */;
({ ActivityActionTypes: c3, ActivityFlags: c4 } = ME);
const result = set.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 (resultDefault(presenceActivity, message, tmp2.id)) {
let obj = getPartySize;
const partySize = obj.getPartySize(presenceActivity);
if (obj2.hasPartySize(partySize)) {
let tmp6Result = tmp6(11762);
if (!tmp6Result.isPartyFull(partySize)) {
tmp6Result = tmp6(11763);
if (tmp6Result.getIsInParty(tmp, presenceActivity)) {
return { canJoin: false, remoteJoinPlatform: null };
} else {
if (tmp6Result1.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(11765).getRemoteJoinableActivityPlatform(presenceActivity);
if (null != remoteJoinableActivityPlatform) {
obj = { canJoin: true, remoteJoinPlatform: null };
obj[1] = remoteJoinableActivityPlatform;
return obj;
} else if (tmp13(7313)(presenceActivity, constants2.SUPPORTS_JOIN_URL)) {
return { canJoin: true, remoteJoinPlatform: null };
}
const tmp6Result2 = tmp6(11765);
}
}
if (tmp6Result3.platformSupportsActivityJoin()) {
if (tmp5) {
obj = { canJoin: true, remoteJoinPlatform: null };
}
return obj;
}
obj = { canJoin: false, remoteJoinPlatform: null };
tmp6Result3 = tmp6(1115);
}
tmp6Result1 = tmp6(11764);
}
}
}
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 = resultDefault(activity, arg2, id.id);
if (tmp6) {
let tmp8 = tmp4(7313)(activity, constants2.SYNC);
if (tmp8) {
let isPlatformEmbedded = set2.isPlatformEmbedded;
if (isPlatformEmbedded) {
isPlatformEmbedded = !tmp9(11763).getIsInParty(tmp8Result, activity);
const tmp9Result = tmp9(11763);
}
tmp8 = isPlatformEmbedded;
tmp9 = require;
}
tmp6 = tmp8;
}
tmp = tmp6;
tmp4 = importDefault;
}
return tmp;
};