decord/source/modules/messages/canEditMessage.tsx

60 lines
1.9 KiB
TypeScript
Raw Normal View History

// Module ID: 11817
// Function ID: 11818
2026-07-20 16:05:17 +00:00
// Name: canEditMessage
// Dependencies: [1074, 7322, 4828, 7354, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 11817 (canEditMessage)
import MessageRecordUtils from "MessageRecordUtils" /* 4828 */;
import isSystemMessageDefault from "isSystemMessage" /* 7322 */;
import Constants from "Constants" /* 1074 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
({ MessageFlags: c3, MessageStates: closure_4, MessageTypes: hasOwnProperty } = Constants);
let result = size.fileFinishedImporting("modules/messages/canEditMessage.tsx");
2026-07-20 16:05:17 +00:00
export default function canEditMessage(author, arg1) {
2026-07-20 16:05:17 +00:00
let tmp = null != arg1;
if (tmp) {
2026-07-29 08:29:29 +00:00
let tmp3 = author.author.id === arg1;
if (tmp3) {
let tmp5 = author.state === constants2.SENT;
if (tmp5) {
2026-08-24 06:08:38 +00:00
const tmp8 = isSystemMessageDefault(author);
2026-07-29 08:29:29 +00:00
let tmp9 = !tmp8;
if (!tmp8) {
let result = MessageRecordUtils.canEditMessageWithStickers(author);
2026-07-29 08:29:29 +00:00
if (result) {
const hasFlagResult = author.hasFlag(constants.IS_VOICE_MESSAGE);
let tmp14 = !hasFlagResult;
if (!hasFlagResult) {
let tmp15 = null == author.referralTrialOfferId;
if (tmp15) {
const isPollResult = author.isPoll();
let tmp17 = !isPollResult;
if (!isPollResult) {
const tmp18 = tmp6(7354)(author);
2026-07-29 08:29:29 +00:00
let tmp19 = !tmp18;
if (!tmp18) {
tmp19 = author.type !== constants3.MEDIA_MENTION_MESSAGE;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp17 = tmp19;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp15 = tmp17;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp14 = tmp15;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
result = tmp14;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp9 = result;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp5 = tmp9;
tmp6 = importDefault;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp3 = tmp5;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp = tmp3;
2026-07-20 16:05:17 +00:00
}
return tmp;
};