46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
// Module ID: 12622
|
|
// Function ID: 12623
|
|
// Name: getCanSendInvite
|
|
// Dependencies: [676, 11152, 5928, 11153, 11154, 11155, 2]
|
|
// Exports: getCanSendInvite
|
|
|
|
// Module 12622 (getCanSendInvite)
|
|
import ME from "ME";
|
|
|
|
let c3;
|
|
let c4;
|
|
({ ActivityFlags: c3, ActivityActionTypes: c4 } = ME);
|
|
const result = require("hasFlag").fileFinishedImporting("modules/activities/utils/getCanSendInvite.tsx");
|
|
|
|
export const getCanSendInvite = function getCanSendInvite(findActivityResult, author, application, id1) {
|
|
if (author.author.id === id1) {
|
|
return false;
|
|
} else {
|
|
if (importDefault(11152)(findActivityResult, author, application.id)) {
|
|
const activity = author.activity;
|
|
let type;
|
|
if (activity != null) {
|
|
type = activity.type;
|
|
}
|
|
if (type !== constants2.JOIN_REQUEST) {
|
|
return false;
|
|
} else if (tmp11(5928)(findActivityResult, constants.JOIN)) {
|
|
const partySize = require(11153) /* getPartySize */.getPartySize(findActivityResult);
|
|
const obj = require(11153) /* getPartySize */;
|
|
const tmp5 = require;
|
|
const hasPartySizeResult = require(11154) /* hasPartySize */.hasPartySize(partySize);
|
|
let isPartyFullResult = !hasPartySizeResult;
|
|
if (hasPartySizeResult) {
|
|
isPartyFullResult = tmp5(11155).isPartyFull(partySize);
|
|
const tmp5Result = tmp5(11155);
|
|
}
|
|
return !isPartyFullResult;
|
|
} else {
|
|
return false;
|
|
}
|
|
} else {
|
|
return false;
|
|
}
|
|
tmp11 = importDefault;
|
|
}
|
|
};
|