decord/source/modules/messages/canEditMessage.tsx

61 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 5430
// Function ID: 5431
2026-07-20 16:05:17 +00:00
// Name: canEditMessage
2026-08-24 06:08:38 +00:00
// Dependencies: [676, 5390, 4808, 5031, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 5430 (canEditMessage)
import set from "set" /* 2 */;
import createMinimalMessageRecord from "createMinimalMessageRecord" /* 4808 */;
import isSystemMessageDefault from "isSystemMessage" /* 5390 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
({ MessageFlags: c3, MessageStates: c4, MessageTypes: c5 } = ME);
2026-08-24 06:08:38 +00:00
let result = set.fileFinishedImporting("modules/messages/canEditMessage.tsx");
2026-07-20 16:05:17 +00:00
export default function canEditMessage(author) {
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) {
2026-08-24 06:08:38 +00:00
let result = createMinimalMessageRecord.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) {
2026-08-24 06:08:38 +00:00
const tmp18 = tmp6(5031)(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-08-24 06:08:38 +00:00
const obj = createMinimalMessageRecord;
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;
};