2026-09-10 19:12:31 +00:00
|
|
|
// Module ID: 11387
|
|
|
|
|
// Function ID: 11388
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: parseReactionPermissions
|
2026-07-23 10:11:24 +00:00
|
|
|
// Dependencies: [2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-10 19:12:31 +00:00
|
|
|
// Module 11387 (parseReactionPermissions)
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/messages/parseReactionPermissions.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function parseReactionPermissions(arg0) {
|
|
|
|
|
({ channel, canChat, isLurking, isActiveChannelOrUnarchivableThread, renderReactions, canAddNewReactions, communicationDisabled, isAutomodQuarantined } = arg0);
|
|
|
|
|
const isPrivateResult = channel.isPrivate();
|
|
|
|
|
const isMediaThreadResult = channel.isMediaThread();
|
|
|
|
|
if (!canChat) {
|
|
|
|
|
canChat = isPrivateResult;
|
|
|
|
|
}
|
|
|
|
|
if (canChat) {
|
|
|
|
|
canChat = isActiveChannelOrUnarchivableThread;
|
|
|
|
|
}
|
|
|
|
|
if (canChat) {
|
|
|
|
|
canChat = !isMediaThreadResult;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj = { disableReactionReads: !renderReactions, disableReactionCreates: null, disableReactionUpdates: null };
|
2026-07-20 16:05:17 +00:00
|
|
|
let tmp4 = isLurking;
|
|
|
|
|
if (!isLurking) {
|
|
|
|
|
tmp4 = !canChat;
|
|
|
|
|
}
|
|
|
|
|
if (!tmp4) {
|
|
|
|
|
tmp4 = !((true === canAddNewReactions || isPrivateResult) && !isSystemDMResult && isActiveChannelOrUnarchivableThread && !isMediaThreadResult);
|
|
|
|
|
const tmp5 = (true === canAddNewReactions || isPrivateResult) && !isSystemDMResult && isActiveChannelOrUnarchivableThread && !isMediaThreadResult;
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
obj.disableReactionCreates = tmp4;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (!isLurking) {
|
|
|
|
|
isLurking = !canChat;
|
|
|
|
|
}
|
|
|
|
|
if (!isLurking) {
|
|
|
|
|
isLurking = true === communicationDisabled;
|
|
|
|
|
}
|
|
|
|
|
if (!isLurking) {
|
|
|
|
|
isLurking = true === isAutomodQuarantined;
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
obj.disableReactionUpdates = isLurking;
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
};
|