decord/source/modules/explicit_media_redaction/ExplicitMediaManagerUtils.tsx

51 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 6846
// Function ID: 54127
2026-07-20 16:05:17 +00:00
// Name: hasAttachmentsEmbedsOrComponents
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: hasAttachmentsEmbedsComponentsOrSnapshots
2026-07-23 10:11:24 +00:00
// Module 6846 (hasAttachmentsEmbedsOrComponents)
2026-07-20 16:05:17 +00:00
function hasAttachmentsEmbedsOrComponents(attachments) {
let tmp = null != attachments.attachments;
if (tmp) {
tmp = attachments.attachments.length > 0;
}
if (!tmp) {
let tmp2 = null != attachments.embeds;
if (tmp2) {
tmp2 = attachments.embeds.length > 0;
}
tmp = tmp2;
}
if (!tmp) {
let tmp3 = null != attachments.components;
if (tmp3) {
tmp3 = attachments.components.length > 0;
}
tmp = tmp3;
}
return tmp;
}
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/explicit_media_redaction/ExplicitMediaManagerUtils.tsx");
2026-07-20 16:05:17 +00:00
export const hasAttachmentsEmbedsComponentsOrSnapshots = function hasAttachmentsEmbedsComponentsOrSnapshots(message) {
if (null == message) {
return false;
} else {
const obj = "messageSnapshots" in message ? message.messageSnapshots : message.message_snapshots;
let tmp2 = hasAttachmentsEmbedsOrComponents(message);
if (!tmp2) {
let tmp3 = null != obj;
if (tmp3) {
let someResult;
if (null != obj) {
2026-07-23 10:11:24 +00:00
someResult = obj.some((message) => outer1_0(message.message));
2026-07-20 16:05:17 +00:00
}
tmp3 = someResult;
}
tmp2 = tmp3;
}
return tmp2;
}
};