Files
discord-decomp/modules/group_dm/getGroupDMRecipientLimit.tsx
T
2026-11-01 12:12:55 +02:00

21 lines
601 B
TypeScript

// Metro module 15586 (f15587).
import UserStore from "../../stores/UserStore";
import { MAX_GROUP_DM_PARTICIPANTS, MAX_GROUP_DM_STAFF_PARTICIPANTS } from "../../Constants";
export default function getGroupDMRecipientLimit(a0) {
let r11;
const currentUser = UserStore.getCurrentUser();
const r7 = currentUser == null ? void 0 : currentUser.isStaff();
L9: {
if (r7) {
r11 = MAX_GROUP_DM_STAFF_PARTICIPANTS;
} else {
if (a0 != null && a0.userLimit > 0) {
r11 = a0.userLimit;
break L9;
}
r11 = MAX_GROUP_DM_PARTICIPANTS;
}
}
return r11;
};