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

64 lines
2 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 10747
// Function ID: 10748
2026-07-20 16:05:17 +00:00
// Name: canEditMessage
2026-10-09 10:00:15 +00:00
// Dependencies: [1085, 6086, 5431, 6995, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-10-09 10:00:15 +00:00
// Module 10747 (canEditMessage)
import MessageRecordUtils from "MessageRecordUtils" /* 5431 */;
import isSystemMessageDefault from "isSystemMessage" /* 6086 */;
import isForwardMessageDefault from "isForwardMessage" /* 6995 */;
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 c3;
let closure_4;
let hasOwnProperty;
({ 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-10-03 08:58:59 +00:00
let tmp9 = !isSystemMessageDefault(author);
isSystemMessageDefault(author);
if (tmp9) {
const obj = MessageRecordUtils;
let result = obj.canEditMessageWithStickers(author);
2026-07-29 08:29:29 +00:00
if (result) {
2026-10-03 08:58:59 +00:00
let tmp14 = !author.hasFlag(constants.IS_VOICE_MESSAGE);
author.hasFlag(constants.IS_VOICE_MESSAGE);
if (tmp14) {
2026-07-29 08:29:29 +00:00
let tmp15 = null == author.referralTrialOfferId;
if (tmp15) {
2026-10-03 08:58:59 +00:00
let tmp17 = !author.isPoll();
author.isPoll();
if (tmp17) {
2026-10-09 10:00:15 +00:00
let tmp19 = !tmp6(6995)(author);
2026-10-03 08:58:59 +00:00
isForwardMessageDefault(author);
if (tmp19) {
tmp19 = author.type !== hasOwnProperty.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;
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;
};