decord/source/modules/replies/native/replyToMessage.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

101 lines
4.1 KiB
TypeScript

// Module ID: 11684
// Function ID: 11685
// Name: longPressMessageHandleReply
// Dependencies: [7681, 1371, 7680, 1074, 1242, 11672, 7456, 11674, 4740, 2]
// Exports: default
// Module 11684 (longPressMessageHandleReply)
import expandEventPropertiesDefault from "expandEventProperties" /* 1242 */;
import collectGuildAnalyticsMetadata from "collectGuildAnalyticsMetadata" /* 4740 */;
import trackInviteDefault from "trackInvite" /* 7456 */;
import handleEdit from "handleEdit" /* 11672 */;
import createPendingReply from "createPendingReply" /* 11674 */;
import closure_3 from "initialize" /* 7681 */;
import closure_4 from "mergeGuildAvatar" /* 1371 */;
import closure_5 from "getState" /* 7680 */;
import { AnalyticEvents } from "ME" /* 1074 */;
require = arg1;
const result = require("set").fileFinishedImporting("modules/replies/native/replyToMessage.tsx");
export default function longPressMessageHandleReply(arg0) {
({ message, channel, chatInputRef, actionSource, invertible } = arg0);
if (invertible === undefined) {
invertible = false;
}
editingMessage = editingMessage.getEditingMessage(channel.id);
if (null != editingMessage) {
const currentUser = authStore.getCurrentUser();
let obj = { message_id: null, channel_id: null, guild_id: null, context_action: "edit", reason: null, is_own_message: null };
obj[0] = message.id;
({ id: obj11[1], guild_id: obj11[2] } = channel);
const obj10 = expandEventPropertiesDefault;
obj[4] = handleEdit.getContextBarCancelReason("edit", actionSource);
obj[5] = null != currentUser && currentUser.id === editingMessage.author.id;
obj10.track(AnalyticEvents.CHAT_CONTEXT_BAR_ACTION_CANCELED, obj);
const obj12 = handleEdit;
}
obj = trackInviteDefault;
obj.endEditMessage(channel.id);
pendingReply = pendingReply.getPendingReply(channel.id);
if (invertible) {
if ("message_swipe" === actionSource) {
if (null != pendingReply) {
if (pendingReply.message.id === message.id) {
const currentUser1 = authStore.getCurrentUser();
let tmp3Result = tmp3(1242);
obj = { message_id: null, channel_id: null, guild_id: null, context_action: "reply", reason: "swipe_reply_undo", is_own_message: null };
obj[0] = message.id;
({ id: obj8[1], guild_id: obj8[2] } = channel);
let tmp18 = null != currentUser1;
if (tmp18) {
tmp18 = currentUser1.id === pendingReply.message.author.id;
}
obj[5] = tmp18;
tmp3Result.track(AnalyticEvents.CHAT_CONTEXT_BAR_ACTION_CANCELED, obj);
createPendingReply.deletePendingReply(channel.id);
let text;
if (chatInputRef != null) {
const current = chatInputRef.current;
if (current != null) {
text = current.getText();
}
}
if ("" === text) {
if (chatInputRef != null) {
const current2 = chatInputRef.current;
if (current2 != null) {
current2.dismissKeyboard();
}
}
}
const obj9 = createPendingReply;
}
}
}
}
tmp3Result = tmp3(1242);
const merged = Object.assign(collectGuildAnalyticsMetadata.collectGuildAnalyticsMetadata(channel.guild_id));
obj1 = { source: actionSource };
const obj4 = collectGuildAnalyticsMetadata;
const tmp7 = require;
const merged1 = Object.assign(collectGuildAnalyticsMetadata.collectChannelAnalyticsMetadata(channel));
tmp3Result.track(AnalyticEvents.REPLY_MESSAGE_STARTED, obj1);
const currentUser2 = authStore.getCurrentUser();
const isDMResult = channel.isDM();
let tmp13 = !isDMResult;
if (!isDMResult) {
tmp13 = null != currentUser2;
}
if (tmp13) {
tmp13 = message.author.id !== currentUser2.id;
}
const obj5 = collectGuildAnalyticsMetadata;
const pendingReply1 = createPendingReply.createPendingReply({ message, channel, shouldMention: tmp13, source: actionSource });
if (chatInputRef != null) {
const current3 = chatInputRef.current;
if (current3 != null) {
current3.openSystemKeyboard();
}
}
};