2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 8231
|
|
|
|
|
// Function ID: 8232
|
2026-07-29 08:29:29 +00:00
|
|
|
// Name: MessageAccessibilityAction
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [4982, 4024, 676, 4069, 8232, 1236, 8239, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: createMessageAccessibilityActions, getMessageAccessibilityActionFromLabel
|
|
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 8231 (MessageAccessibilityAction)
|
|
|
|
|
import getSystemLocale from "getSystemLocale" /* 1236 */;
|
|
|
|
|
import explicitContentFromProto from "explicitContentFromProto" /* 4069 */;
|
|
|
|
|
import closure_2 from "recomputeGuild" /* 4982 */;
|
|
|
|
|
import closure_3 from "getUncachedChannelPermissions" /* 4024 */;
|
|
|
|
|
import { Permissions } from "ME" /* 676 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
require = arg1;
|
2026-07-29 08:29:29 +00:00
|
|
|
let obj = { VIEW_PROFILE: "view_profile", ADD_REACTION: "add_reaction", ADD_QUICK_REACTION: "add_quick_reaction", REPLY: "reply", MESSAGE_ACTIONS_MENU: "message_actions_menu", EDIT_GDM: "edit_gdm", OPEN_PINS: "open_pins", JUMP_TO_MESSAGE: "jump_to_message" };
|
2026-08-24 06:08:38 +00:00
|
|
|
let result = require("set").fileFinishedImporting("modules/messages/native/MessageAccessibilityActions.tsx");
|
2026-07-29 08:29:29 +00:00
|
|
|
|
|
|
|
|
export const MessageAccessibilityAction = obj;
|
|
|
|
|
export const getMessageAccessibilityActionFromLabel = function getMessageAccessibilityActionFromLabel(action) {
|
2026-08-24 06:08:38 +00:00
|
|
|
obj = {};
|
|
|
|
|
const intl = getSystemLocale.intl;
|
|
|
|
|
obj[intl.string(getSystemLocale.t.iXAna6)] = obj.VIEW_PROFILE;
|
|
|
|
|
const intl2 = getSystemLocale.intl;
|
|
|
|
|
obj[intl2.string(getSystemLocale.t.lfIHs4)] = obj.ADD_REACTION;
|
|
|
|
|
const intl3 = getSystemLocale.intl;
|
|
|
|
|
obj[intl3.string(getSystemLocale.t["5IEsGx"])] = obj.REPLY;
|
|
|
|
|
const intl4 = getSystemLocale.intl;
|
|
|
|
|
obj[intl4.string(getSystemLocale.t.ChPNkN)] = obj.MESSAGE_ACTIONS_MENU;
|
|
|
|
|
const intl5 = getSystemLocale.intl;
|
|
|
|
|
obj[intl5.string(getSystemLocale.t["5Q9+/L"])] = obj.EDIT_GDM;
|
|
|
|
|
const intl6 = getSystemLocale.intl;
|
|
|
|
|
obj[intl6.string(getSystemLocale.t["mp1N/2"])] = obj.OPEN_PINS;
|
|
|
|
|
const intl7 = getSystemLocale.intl;
|
|
|
|
|
obj[intl7.string(getSystemLocale.t["+TSRGD"])] = obj.JUMP_TO_MESSAGE;
|
|
|
|
|
const DoubleTapReactionEmoji = explicitContentFromProto.DoubleTapReactionEmoji;
|
2026-07-20 16:05:17 +00:00
|
|
|
const setting = DoubleTapReactionEmoji.getSetting();
|
|
|
|
|
let disableDoubleTap;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (setting != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
disableDoubleTap = setting.disableDoubleTap;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
let formatToPlainStringResult = null;
|
|
|
|
|
if (true !== disableDoubleTap) {
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != setting) {
|
2026-08-24 06:08:38 +00:00
|
|
|
const result = tmp(8232).disambiguatedEmojiFromSettingsValue(setting);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != result) {
|
2026-07-29 08:29:29 +00:00
|
|
|
const intl9 = tmp(1236).intl;
|
|
|
|
|
obj = { emojiName: null };
|
|
|
|
|
obj[0] = result.name;
|
|
|
|
|
formatToPlainStringResult = intl9.formatToPlainString(tmp(1236).t.eQIttH, obj);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
const tmpResult = tmp(8232);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const intl8 = tmp(1236).intl;
|
|
|
|
|
formatToPlainStringResult = intl8.formatToPlainString(tmp(1236).t.eQIttH, { emojiName: "heart" });
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (null != formatToPlainStringResult) {
|
|
|
|
|
obj[formatToPlainStringResult] = obj.ADD_QUICK_REACTION;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return obj[action];
|
|
|
|
|
};
|
|
|
|
|
export const createMessageAccessibilityActions = function createMessageAccessibilityActions(message, channel) {
|
|
|
|
|
if (null == channel) {
|
|
|
|
|
return [];
|
|
|
|
|
} else {
|
|
|
|
|
const guildId = channel.getGuildId();
|
|
|
|
|
let canChatInGuildResult = null != guildId;
|
|
|
|
|
if (canChatInGuildResult) {
|
2026-08-24 06:08:38 +00:00
|
|
|
canChatInGuildResult = closure_2.canChatInGuild(guildId);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
if (canChatInGuildResult) {
|
2026-08-24 06:08:38 +00:00
|
|
|
canChatInGuildResult = closure_3.can(Permissions.ADD_REACTIONS, channel);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
if (!canChatInGuildResult) {
|
|
|
|
|
canChatInGuildResult = channel.isPrivate();
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
obj = { label: null, name: null };
|
|
|
|
|
const intl = getSystemLocale.intl;
|
|
|
|
|
obj[0] = intl.string(getSystemLocale.t.iXAna6);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[1] = obj.VIEW_PROFILE;
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [obj];
|
|
|
|
|
if (canChatInGuildResult) {
|
2026-07-29 08:29:29 +00:00
|
|
|
obj = { label: null, name: null };
|
|
|
|
|
const intl2 = tmp5(1236).intl;
|
|
|
|
|
obj[0] = intl2.string(tmp5(1236).t.lfIHs4);
|
|
|
|
|
obj[1] = tmp7.ADD_REACTION;
|
2026-07-20 16:05:17 +00:00
|
|
|
items.push(obj);
|
2026-08-24 06:08:38 +00:00
|
|
|
const DoubleTapReactionEmoji = tmp5(4069).DoubleTapReactionEmoji;
|
2026-07-29 08:29:29 +00:00
|
|
|
const setting = DoubleTapReactionEmoji.getSetting();
|
|
|
|
|
let disableDoubleTap;
|
|
|
|
|
if (setting != null) {
|
|
|
|
|
disableDoubleTap = setting.disableDoubleTap;
|
|
|
|
|
}
|
|
|
|
|
let formatToPlainStringResult = null;
|
|
|
|
|
if (true !== disableDoubleTap) {
|
|
|
|
|
if (null != setting) {
|
2026-08-24 06:08:38 +00:00
|
|
|
let tmp5Result = tmp5(8232);
|
2026-07-29 08:29:29 +00:00
|
|
|
const result = tmp5Result.disambiguatedEmojiFromSettingsValue(setting);
|
|
|
|
|
if (null != result) {
|
|
|
|
|
const intl4 = tmp5(1236).intl;
|
|
|
|
|
obj = { emojiName: null };
|
|
|
|
|
obj[0] = result.name;
|
|
|
|
|
formatToPlainStringResult = intl4.formatToPlainString(tmp5(1236).t.eQIttH, obj);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const intl3 = tmp5(1236).intl;
|
|
|
|
|
formatToPlainStringResult = intl3.formatToPlainString(tmp5(1236).t.eQIttH, { emojiName: "heart" });
|
|
|
|
|
}
|
|
|
|
|
if (null != formatToPlainStringResult) {
|
2026-08-24 06:08:38 +00:00
|
|
|
obj1 = { label: null, name: null };
|
2026-07-29 08:29:29 +00:00
|
|
|
obj1[0] = formatToPlainStringResult;
|
|
|
|
|
obj1[1] = tmp7.ADD_QUICK_REACTION;
|
|
|
|
|
items.push(obj1);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
tmp5Result = tmp5(8239);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (tmp5Result.canReplyToMessage(channel, message)) {
|
|
|
|
|
const obj2 = { label: null, name: null };
|
|
|
|
|
const intl5 = tmp5(1236).intl;
|
|
|
|
|
obj2[0] = intl5.string(tmp5(1236).t["5IEsGx"]);
|
|
|
|
|
obj2[1] = tmp7.REPLY;
|
|
|
|
|
items.push(obj2);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj3 = { label: null, name: null };
|
|
|
|
|
const intl6 = tmp5(1236).intl;
|
2026-08-24 06:08:38 +00:00
|
|
|
obj3[0] = intl6.string(getSystemLocale.t.ChPNkN);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj3[1] = obj.MESSAGE_ACTIONS_MENU;
|
|
|
|
|
items.push(obj3);
|
2026-07-20 16:05:17 +00:00
|
|
|
return items;
|
|
|
|
|
}
|
|
|
|
|
};
|