decord/alpha/source/modules/messages/isCrosspost.tsx

32 lines
899 B
TypeScript
Raw Permalink Normal View History

2026-10-12 06:59:38 +00:00
// Module ID: 8066
// Function ID: 8067
2026-07-20 16:05:17 +00:00
// Name: isCrosspost
2026-10-09 10:00:15 +00:00
// Dependencies: [1085, 1403, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-10-12 06:59:38 +00:00
// Module 8066 (isCrosspost)
2026-10-09 10:00:15 +00:00
import FlagUtils from "FlagUtils" /* 1403 */;
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
let c2;
let c3;
let closure_4;
({ MessageFlags: c2, MessageReferenceTypes: c3, MessageTypes: closure_4 } = Constants);
const result = size.fileFinishedImporting("modules/messages/isCrosspost.tsx");
2026-07-20 16:05:17 +00:00
export default function isCrosspost(type) {
let hasFlagResult = type.type === constants3.DEFAULT;
if (hasFlagResult) {
2026-10-03 08:58:59 +00:00
const obj = FlagUtils;
hasFlagResult = obj.hasFlag(type.flags, constants.IS_CROSSPOST);
2026-07-20 16:05:17 +00:00
}
if (hasFlagResult) {
hasFlagResult = null != type.messageReference;
}
if (hasFlagResult) {
hasFlagResult = type.messageReference.type !== constants2.FORWARD;
}
return hasFlagResult;
};