1096 lines
62 KiB
TypeScript
1096 lines
62 KiB
TypeScript
/* Metro module 10919; source: modules/message_previews/useFormattedMessagePreview.tsx; dependencies: [1226, 3793, 1878, 661, 671, 566, 8214, 4634, 1244, 4631, 4845, 22, 8233, 8319, 2] */
|
|
function _fun83669(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:6, offset: 0x01f233ef, size: 208 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const closure = isMessageContentPreviewable;
|
|
const closure2 = formatMessagePreview;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const env0_6 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/message_previews/useFormattedMessagePreview.tsx');
|
|
exports.isMessageContentPreviewable = closure;
|
|
exports.useFormattedMessagePreview = useFormattedMessagePreview;
|
|
exports.formatMessagePreview = closure2;
|
|
}
|
|
|
|
function isMessageContentPreviewable({type}) { // fn#83670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:149, offset: 0x01f234bf, size: 264 bytes, params: 2, frame: 14
|
|
const MessageTypes = (require(671) /* metro dependency 671: MessageTypes */).MessageTypes;
|
|
const DEFAULT = MessageTypes.DEFAULT;
|
|
if (DEFAULT === type) {
|
|
return true;
|
|
}
|
|
const CHANGELOG = MessageTypes.CHANGELOG;
|
|
if (CHANGELOG === type) {
|
|
return true;
|
|
}
|
|
const REPLY = MessageTypes.REPLY;
|
|
if (REPLY === type) {
|
|
return true;
|
|
}
|
|
const CHAT_INPUT_COMMAND = MessageTypes.CHAT_INPUT_COMMAND;
|
|
if (CHAT_INPUT_COMMAND === type) {
|
|
return true;
|
|
}
|
|
const CONTEXT_MENU_COMMAND = MessageTypes.CONTEXT_MENU_COMMAND;
|
|
if (CONTEXT_MENU_COMMAND === type) {
|
|
return true;
|
|
}
|
|
const POLL_RESULT = MessageTypes.POLL_RESULT;
|
|
if (POLL_RESULT === type) {
|
|
return true;
|
|
}
|
|
const AUTO_MODERATION_ACTION = MessageTypes.AUTO_MODERATION_ACTION;
|
|
if (AUTO_MODERATION_ACTION === type) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function formatMessagePreview(a0, a1) { // fn#83671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:512, offset: 0x01f235c7, size: 2732 bytes, params: 3, frame: 30
|
|
var r9;
|
|
var r4;
|
|
var value3;
|
|
var currentUserId;
|
|
var otherUser;
|
|
var otherUserNick;
|
|
var isCallActive;
|
|
const MessageTypes = (require(671) /* metro dependency 671: MessageTypes */).MessageTypes;
|
|
var object2;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var formatToPlainString;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const identity = (require(22) /* metro dependency 22 */).identity;
|
|
const isBlocked = a1.isBlocked;
|
|
const isIgnored = a1.isIgnored;
|
|
let authorNick = a1.authorNick;
|
|
var value;
|
|
if (isBlocked) {
|
|
return {type: 'text', text: intl.string(t.XAkOo2)};
|
|
}
|
|
if (isIgnored) {
|
|
object2 = {type: 'text'};
|
|
object2.text = intl.string(t['G7p6v/']);
|
|
return object2;
|
|
}
|
|
const isMessageContentPreviewableBinding = isMessageContentPreviewable;
|
|
const value2 = undefined;
|
|
if (isMessageContentPreviewableBinding(a0)) {
|
|
value3 = formatMessageContentPreview(a0);
|
|
if (value3 != null) {
|
|
object2 = {};
|
|
copyDataProperties(object2, value3, undefined);
|
|
object2['authorLabel'] = authorNick;
|
|
return object2;
|
|
}
|
|
currentUserId = a1.currentUserId;
|
|
authorNick = a1.authorNick;
|
|
otherUser = a1.otherUser;
|
|
otherUserNick = a1.otherUserNick;
|
|
isCallActive = a1.isCallActive;
|
|
if (a0.type !== MessageTypes.RECIPIENT_ADD) {
|
|
if (a0.type !== MessageTypes.RECIPIENT_REMOVE) {
|
|
if (a0.type === MessageTypes.CALL) {
|
|
object2 = {type: 'text'};
|
|
r9 = isCallActive ? intl.string(t['NGg/fm']) : a0.call == null || a0.call.participants.includes(currentUserId) ? intl.string(t.v05Xd6) : intl.string(t['2CnhoI']);
|
|
object2.text = r9;
|
|
r9 = isCallActive ? 'text-feedback-positive' : value2;
|
|
object2.color = r9;
|
|
r9 = isCallActive ? 'call-active' : 'call-ended';
|
|
object2.trailingIcon = r9;
|
|
r4 = object2;
|
|
} else if (a0.type === MessageTypes.CHANNEL_NAME_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.oItgEw, {username: authorNick,
|
|
usernameHook: identity,
|
|
channelName: a0.content})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_ICON_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.OEdU6X, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_PINNED_MESSAGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vfkjqx, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.USER_JOIN) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
value = importDefault(8233) /* metro dependency 8233: SystemMessageUtils */;
|
|
value = value.getSystemMessageUserJoin(a0.id);
|
|
r4 = {type: 'text', text: Reflect.apply(formatToPlainString, intl, [value, {username: authorNick,
|
|
usernameHook: identity}])};
|
|
} else if (a0.type === MessageTypes.THREAD_CREATED) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.SGaUAU, {actorName: authorNick,
|
|
actorHook: identity,
|
|
threadName: a0.content, threadOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.PREMIUM_REFERRAL) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.lieTqU, {username: authorNick})};
|
|
} else if (a0.type === MessageTypes.STAGE_START) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.aZtRW8, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_END) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vMJhvG, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_SPEAKER) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.V4uCm4, {username: authorNick,
|
|
usernameOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.STAGE_TOPIC) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.ro3RM0, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type !== MessageTypes.VOICE_SESSION) {
|
|
r4 = value2;
|
|
} else {
|
|
object2 = {type: 'text'};
|
|
object2.text = (require(8319) /* metro dependency 8319: VoiceSessionUtils */).getVoiceSessionMessageContent(a0);
|
|
r4 = object2;
|
|
}
|
|
} else if (otherUserNick != null) {
|
|
r4 = {type: 'text',
|
|
text: a0.author.id === (otherUser == null ? value2 : otherUser.id) ? intl.formatToPlainString(t['5v2xa8'],
|
|
|
|
|
|
{username: authorNick, usernameHook: identity}) : intl.formatToPlainString(t.L2FyVq,
|
|
{username: authorNick,
|
|
usernameHook: identity, otherUsername: otherUserNick, otherUsernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CALL) {
|
|
object2 = {type: 'text'};
|
|
r9 = isCallActive ? intl.string(t['NGg/fm']) : a0.call == null || a0.call.participants.includes(currentUserId) ? intl.string(t.v05Xd6) : intl.string(t['2CnhoI']);
|
|
object2.text = r9;
|
|
r9 = isCallActive ? 'text-feedback-positive' : value2;
|
|
object2.color = r9;
|
|
r9 = isCallActive ? 'call-active' : 'call-ended';
|
|
object2.trailingIcon = r9;
|
|
r4 = object2;
|
|
} else if (a0.type === MessageTypes.CHANNEL_NAME_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.oItgEw, {username: authorNick,
|
|
usernameHook: identity,
|
|
channelName: a0.content})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_ICON_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.OEdU6X, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_PINNED_MESSAGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vfkjqx, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.USER_JOIN) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
value = importDefault(8233) /* metro dependency 8233: SystemMessageUtils */;
|
|
value = value.getSystemMessageUserJoin(a0.id);
|
|
r4 = {type: 'text', text: Reflect.apply(formatToPlainString, intl, [value, {username: authorNick,
|
|
usernameHook: identity}])};
|
|
} else if (a0.type === MessageTypes.THREAD_CREATED) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.SGaUAU, {actorName: authorNick,
|
|
actorHook: identity,
|
|
threadName: a0.content, threadOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.PREMIUM_REFERRAL) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.lieTqU, {username: authorNick})};
|
|
} else if (a0.type === MessageTypes.STAGE_START) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.aZtRW8, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_END) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vMJhvG, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_SPEAKER) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.V4uCm4, {username: authorNick,
|
|
usernameOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.STAGE_TOPIC) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.ro3RM0, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type !== MessageTypes.VOICE_SESSION) {
|
|
r4 = value2;
|
|
} else {
|
|
object2 = {type: 'text'};
|
|
object2.text = (require(8319) /* metro dependency 8319: VoiceSessionUtils */).getVoiceSessionMessageContent(a0);
|
|
r4 = object2;
|
|
}
|
|
} else if (otherUserNick != null) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.MMN2Jq, {username: authorNick, usernameHook: identity,
|
|
otherUsername: otherUserNick, otherUsernameHook: identity})};
|
|
} else if (a0.type !== MessageTypes.RECIPIENT_REMOVE) {
|
|
if (a0.type === MessageTypes.CALL) {
|
|
object2 = {type: 'text'};
|
|
r9 = isCallActive ? intl.string(t['NGg/fm']) : a0.call == null || a0.call.participants.includes(currentUserId) ? intl.string(t.v05Xd6) : intl.string(t['2CnhoI']);
|
|
object2.text = r9;
|
|
r9 = isCallActive ? 'text-feedback-positive' : value2;
|
|
object2.color = r9;
|
|
r9 = isCallActive ? 'call-active' : 'call-ended';
|
|
object2.trailingIcon = r9;
|
|
r4 = object2;
|
|
} else if (a0.type === MessageTypes.CHANNEL_NAME_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.oItgEw, {username: authorNick,
|
|
usernameHook: identity,
|
|
channelName: a0.content})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_ICON_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.OEdU6X, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_PINNED_MESSAGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vfkjqx, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.USER_JOIN) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
value = importDefault(8233) /* metro dependency 8233: SystemMessageUtils */;
|
|
value = value.getSystemMessageUserJoin(a0.id);
|
|
r4 = {type: 'text', text: Reflect.apply(formatToPlainString, intl, [value, {username: authorNick,
|
|
usernameHook: identity}])};
|
|
} else if (a0.type === MessageTypes.THREAD_CREATED) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.SGaUAU, {actorName: authorNick,
|
|
actorHook: identity,
|
|
threadName: a0.content, threadOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.PREMIUM_REFERRAL) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.lieTqU, {username: authorNick})};
|
|
} else if (a0.type === MessageTypes.STAGE_START) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.aZtRW8, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_END) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vMJhvG, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_SPEAKER) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.V4uCm4, {username: authorNick,
|
|
usernameOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.STAGE_TOPIC) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.ro3RM0, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type !== MessageTypes.VOICE_SESSION) {
|
|
r4 = value2;
|
|
} else {
|
|
object2 = {type: 'text'};
|
|
object2.text = (require(8319) /* metro dependency 8319: VoiceSessionUtils */).getVoiceSessionMessageContent(a0);
|
|
r4 = object2;
|
|
}
|
|
} else if (otherUserNick != null) {
|
|
r4 = {type: 'text',
|
|
text: a0.author.id === (otherUser == null ? value2 : otherUser.id) ? intl.formatToPlainString(t['5v2xa8'],
|
|
|
|
{username: authorNick, usernameHook: identity}) : intl.formatToPlainString(t.L2FyVq,
|
|
{username: authorNick,
|
|
usernameHook: identity, otherUsername: otherUserNick, otherUsernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CALL) {
|
|
object2 = {type: 'text'};
|
|
r9 = isCallActive ? intl.string(t['NGg/fm']) : a0.call == null || a0.call.participants.includes(currentUserId) ? intl.string(t.v05Xd6) : intl.string(t['2CnhoI']);
|
|
object2.text = r9;
|
|
r9 = isCallActive ? 'text-feedback-positive' : value2;
|
|
object2.color = r9;
|
|
r9 = isCallActive ? 'call-active' : 'call-ended';
|
|
object2.trailingIcon = r9;
|
|
r4 = object2;
|
|
} else if (a0.type === MessageTypes.CHANNEL_NAME_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.oItgEw, {username: authorNick, usernameHook: identity,
|
|
channelName: a0.content})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_ICON_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.OEdU6X, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_PINNED_MESSAGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vfkjqx, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.USER_JOIN) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
value = importDefault(8233) /* metro dependency 8233: SystemMessageUtils */;
|
|
value = value.getSystemMessageUserJoin(a0.id);
|
|
r4 = {type: 'text', text: Reflect.apply(formatToPlainString, intl, [value, {username: authorNick,
|
|
usernameHook: identity}])};
|
|
} else if (a0.type === MessageTypes.THREAD_CREATED) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.SGaUAU, {actorName: authorNick, actorHook: identity,
|
|
threadName: a0.content, threadOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.PREMIUM_REFERRAL) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.lieTqU, {username: authorNick})};
|
|
} else if (a0.type === MessageTypes.STAGE_START) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.aZtRW8, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_END) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vMJhvG, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_SPEAKER) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.V4uCm4, {username: authorNick,
|
|
usernameOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.STAGE_TOPIC) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.ro3RM0, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type !== MessageTypes.VOICE_SESSION) {
|
|
r4 = value2;
|
|
} else {
|
|
object2 = {type: 'text'};
|
|
object2.text = (require(8319) /* metro dependency 8319: VoiceSessionUtils */).getVoiceSessionMessageContent(a0);
|
|
r4 = object2;
|
|
}
|
|
} else {
|
|
currentUserId = a1.currentUserId;
|
|
authorNick = a1.authorNick;
|
|
otherUser = a1.otherUser;
|
|
otherUserNick = a1.otherUserNick;
|
|
isCallActive = a1.isCallActive;
|
|
if (a0.type !== MessageTypes.RECIPIENT_ADD) {
|
|
if (a0.type !== MessageTypes.RECIPIENT_REMOVE) {
|
|
if (a0.type === MessageTypes.CALL) {
|
|
object2 = {type: 'text'};
|
|
r9 = isCallActive ? intl.string(t['NGg/fm']) : a0.call == null || a0.call.participants.includes(currentUserId) ? intl.string(t.v05Xd6) : intl.string(t['2CnhoI']);
|
|
object2.text = r9;
|
|
r9 = isCallActive ? 'text-feedback-positive' : value2;
|
|
object2.color = r9;
|
|
r9 = isCallActive ? 'call-active' : 'call-ended';
|
|
object2.trailingIcon = r9;
|
|
r4 = object2;
|
|
} else if (a0.type === MessageTypes.CHANNEL_NAME_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.oItgEw, {username: authorNick,
|
|
usernameHook: identity,
|
|
channelName: a0.content})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_ICON_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.OEdU6X, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_PINNED_MESSAGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vfkjqx, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.USER_JOIN) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
value = importDefault(8233) /* metro dependency 8233: SystemMessageUtils */;
|
|
value = value.getSystemMessageUserJoin(a0.id);
|
|
r4 = {type: 'text', text: Reflect.apply(formatToPlainString, intl, [value, {username: authorNick,
|
|
usernameHook: identity}])};
|
|
} else if (a0.type === MessageTypes.THREAD_CREATED) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.SGaUAU, {actorName: authorNick,
|
|
actorHook: identity,
|
|
threadName: a0.content, threadOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.PREMIUM_REFERRAL) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.lieTqU, {username: authorNick})};
|
|
} else if (a0.type === MessageTypes.STAGE_START) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.aZtRW8, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_END) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vMJhvG, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_SPEAKER) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.V4uCm4, {username: authorNick,
|
|
usernameOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.STAGE_TOPIC) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.ro3RM0, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type !== MessageTypes.VOICE_SESSION) {
|
|
r4 = value2;
|
|
} else {
|
|
object2 = {type: 'text'};
|
|
object2.text = (require(8319) /* metro dependency 8319: VoiceSessionUtils */).getVoiceSessionMessageContent(a0);
|
|
r4 = object2;
|
|
}
|
|
} else if (otherUserNick != null) {
|
|
r4 = {type: 'text',
|
|
text: a0.author.id === (otherUser == null ? value2 : otherUser.id) ? intl.formatToPlainString(t['5v2xa8'],
|
|
|
|
|
|
{username: authorNick, usernameHook: identity}) : intl.formatToPlainString(t.L2FyVq,
|
|
{username: authorNick,
|
|
usernameHook: identity, otherUsername: otherUserNick, otherUsernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CALL) {
|
|
object2 = {type: 'text'};
|
|
r9 = isCallActive ? intl.string(t['NGg/fm']) : a0.call == null || a0.call.participants.includes(currentUserId) ? intl.string(t.v05Xd6) : intl.string(t['2CnhoI']);
|
|
object2.text = r9;
|
|
r9 = isCallActive ? 'text-feedback-positive' : value2;
|
|
object2.color = r9;
|
|
r9 = isCallActive ? 'call-active' : 'call-ended';
|
|
object2.trailingIcon = r9;
|
|
r4 = object2;
|
|
} else if (a0.type === MessageTypes.CHANNEL_NAME_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.oItgEw, {username: authorNick,
|
|
usernameHook: identity,
|
|
channelName: a0.content})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_ICON_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.OEdU6X, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_PINNED_MESSAGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vfkjqx, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.USER_JOIN) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
value = importDefault(8233) /* metro dependency 8233: SystemMessageUtils */;
|
|
value = value.getSystemMessageUserJoin(a0.id);
|
|
r4 = {type: 'text', text: Reflect.apply(formatToPlainString, intl, [value, {username: authorNick,
|
|
usernameHook: identity}])};
|
|
} else if (a0.type === MessageTypes.THREAD_CREATED) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.SGaUAU, {actorName: authorNick,
|
|
actorHook: identity,
|
|
threadName: a0.content, threadOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.PREMIUM_REFERRAL) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.lieTqU, {username: authorNick})};
|
|
} else if (a0.type === MessageTypes.STAGE_START) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.aZtRW8, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_END) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vMJhvG, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_SPEAKER) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.V4uCm4, {username: authorNick,
|
|
usernameOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.STAGE_TOPIC) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.ro3RM0, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type !== MessageTypes.VOICE_SESSION) {
|
|
r4 = value2;
|
|
} else {
|
|
object2 = {type: 'text'};
|
|
object2.text = (require(8319) /* metro dependency 8319: VoiceSessionUtils */).getVoiceSessionMessageContent(a0);
|
|
r4 = object2;
|
|
}
|
|
} else if (otherUserNick != null) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.MMN2Jq, {username: authorNick, usernameHook: identity,
|
|
otherUsername: otherUserNick, otherUsernameHook: identity})};
|
|
} else if (a0.type !== MessageTypes.RECIPIENT_REMOVE) {
|
|
if (a0.type === MessageTypes.CALL) {
|
|
object2 = {type: 'text'};
|
|
r9 = isCallActive ? intl.string(t['NGg/fm']) : a0.call == null || a0.call.participants.includes(currentUserId) ? intl.string(t.v05Xd6) : intl.string(t['2CnhoI']);
|
|
object2.text = r9;
|
|
r9 = isCallActive ? 'text-feedback-positive' : value2;
|
|
object2.color = r9;
|
|
r9 = isCallActive ? 'call-active' : 'call-ended';
|
|
object2.trailingIcon = r9;
|
|
r4 = object2;
|
|
} else if (a0.type === MessageTypes.CHANNEL_NAME_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.oItgEw, {username: authorNick,
|
|
usernameHook: identity,
|
|
channelName: a0.content})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_ICON_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.OEdU6X, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_PINNED_MESSAGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vfkjqx, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.USER_JOIN) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
value = importDefault(8233) /* metro dependency 8233: SystemMessageUtils */;
|
|
value = value.getSystemMessageUserJoin(a0.id);
|
|
r4 = {type: 'text', text: Reflect.apply(formatToPlainString, intl, [value, {username: authorNick,
|
|
usernameHook: identity}])};
|
|
} else if (a0.type === MessageTypes.THREAD_CREATED) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.SGaUAU, {actorName: authorNick,
|
|
actorHook: identity,
|
|
threadName: a0.content, threadOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.PREMIUM_REFERRAL) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.lieTqU, {username: authorNick})};
|
|
} else if (a0.type === MessageTypes.STAGE_START) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.aZtRW8, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_END) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vMJhvG, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_SPEAKER) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.V4uCm4, {username: authorNick,
|
|
usernameOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.STAGE_TOPIC) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.ro3RM0, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type !== MessageTypes.VOICE_SESSION) {
|
|
r4 = value2;
|
|
} else {
|
|
object2 = {type: 'text'};
|
|
object2.text = (require(8319) /* metro dependency 8319: VoiceSessionUtils */).getVoiceSessionMessageContent(a0);
|
|
r4 = object2;
|
|
}
|
|
} else if (otherUserNick != null) {
|
|
r4 = {type: 'text',
|
|
text: a0.author.id === (otherUser == null ? value2 : otherUser.id) ? intl.formatToPlainString(t['5v2xa8'],
|
|
|
|
{username: authorNick, usernameHook: identity}) : intl.formatToPlainString(t.L2FyVq,
|
|
{username: authorNick,
|
|
usernameHook: identity, otherUsername: otherUserNick, otherUsernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CALL) {
|
|
object2 = {type: 'text'};
|
|
r9 = isCallActive ? intl.string(t['NGg/fm']) : a0.call == null || a0.call.participants.includes(currentUserId) ? intl.string(t.v05Xd6) : intl.string(t['2CnhoI']);
|
|
object2.text = r9;
|
|
r9 = isCallActive ? 'text-feedback-positive' : value2;
|
|
object2.color = r9;
|
|
r9 = isCallActive ? 'call-active' : 'call-ended';
|
|
object2.trailingIcon = r9;
|
|
r4 = object2;
|
|
} else if (a0.type === MessageTypes.CHANNEL_NAME_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.oItgEw, {username: authorNick, usernameHook: identity,
|
|
channelName: a0.content})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_ICON_CHANGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.OEdU6X, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.CHANNEL_PINNED_MESSAGE) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vfkjqx, {username: authorNick,
|
|
usernameHook: identity})};
|
|
} else if (a0.type === MessageTypes.USER_JOIN) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
value = importDefault(8233) /* metro dependency 8233: SystemMessageUtils */;
|
|
value = value.getSystemMessageUserJoin(a0.id);
|
|
r4 = {type: 'text', text: Reflect.apply(formatToPlainString, intl, [value, {username: authorNick,
|
|
usernameHook: identity}])};
|
|
} else if (a0.type === MessageTypes.THREAD_CREATED) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.SGaUAU, {actorName: authorNick, actorHook: identity,
|
|
threadName: a0.content, threadOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.PREMIUM_REFERRAL) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.lieTqU, {username: authorNick})};
|
|
} else if (a0.type === MessageTypes.STAGE_START) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.aZtRW8, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_END) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.vMJhvG, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type === MessageTypes.STAGE_SPEAKER) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.V4uCm4, {username: authorNick,
|
|
usernameOnClick: identity})};
|
|
} else if (a0.type === MessageTypes.STAGE_TOPIC) {
|
|
r4 = {type: 'text', text: intl.formatToPlainString(t.ro3RM0, {username: authorNick,
|
|
usernameOnClick: identity,
|
|
topic: a0.content})};
|
|
} else if (a0.type !== MessageTypes.VOICE_SESSION) {
|
|
r4 = value2;
|
|
} else {
|
|
object2 = {type: 'text'};
|
|
object2.text = (require(8319) /* metro dependency 8319: VoiceSessionUtils */).getVoiceSessionMessageContent(a0);
|
|
r4 = object2;
|
|
}
|
|
}
|
|
return r4 ?? value2;
|
|
}
|
|
|
|
function useFormattedMessagePreview(a0, a1) { // fn#83679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:6260, offset: 0x01f2486d, size: 434 bytes, params: 3, frame: 27
|
|
var r9;
|
|
var intl;
|
|
const env0_0 = a0;
|
|
const fluxModule = require(566) /* metro dependency 566: flux */;
|
|
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
|
|
let id = a0.author.id;
|
|
const {isBlocked, isIgnored} = Reflect.apply(useStateFromStoresObject, fluxModule, [[RelationshipStore], _fun83680,
|
|
[id]]);
|
|
const value3 = (importDefault(8214) /* metro dependency 8214: useIsCallActive */)(a1.id, a0.id);
|
|
id = fluxModule.useStateFromStores([AuthenticationStore], function() {
|
|
return AuthenticationStore.getId();
|
|
});
|
|
const nick = (importDefault(4634) /* metro dependency 4634: useMessageAuthor */)(a0).nick;
|
|
const type = a0.type;
|
|
const MessageTypes = (require(671) /* metro dependency 671: MessageTypes */).MessageTypes;
|
|
const USER_JOIN = MessageTypes.USER_JOIN;
|
|
if (type === USER_JOIN) {
|
|
r9 = nick;
|
|
} else if (a0.author.id !== id) {
|
|
r9 = nick;
|
|
} else {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LuZzxn);
|
|
}
|
|
const value5 = fluxModule.useStateFromStores([UserStore], _fun83682);
|
|
const useMessageAuthorModule = require(4634) /* metro dependency 4634: useMessageAuthor */;
|
|
const useNullableUserAuthor = useMessageAuthorModule.useNullableUserAuthor;
|
|
return formatMessagePreview(a0, {message: a0, channel: a1, currentUserId: id, authorNick: r9, otherUser: value5,
|
|
otherUserNick: Reflect.apply(useNullableUserAuthor, useMessageAuthorModule, [value5, a1]).nick,
|
|
isBlocked: isBlocked, isIgnored: isIgnored, isCallActive: value3});
|
|
}
|
|
|
|
function formatMessageContentPreview(a0) { // fn#83672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:774, owner: formatMessagePreview.formatMessageContentPreview, offset: 0x01f24073, size: 1721 bytes, params: 2, frame: 23
|
|
var environment;
|
|
var r5;
|
|
var r0;
|
|
var r4;
|
|
var content;
|
|
var hasFlag;
|
|
var value;
|
|
var object2;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var formatToPlainString;
|
|
var ImizdM;
|
|
var poll;
|
|
var value2;
|
|
var value3;
|
|
var value7;
|
|
var value8;
|
|
let embeds = a0.embeds;
|
|
let length = embeds.length;
|
|
if (length !== 1) {
|
|
content = a0.content;
|
|
if (content == null) {
|
|
hasFlag = a0.hasFlag;
|
|
value = environment.__proto__;
|
|
if (Reflect.apply(hasFlag, a0, [MessageFlags.IS_VOICE_MESSAGE])) {
|
|
return {type: 'text', text: intl.string(t.slFYgi)};
|
|
}
|
|
length = a0.attachments.length;
|
|
if (length > 0) {
|
|
value7 = a0.attachments.every(_fun83673);
|
|
value8 = !value7;
|
|
r4 = value7 ? value8 : a0.attachments.every(_fun83674);
|
|
r0 = value7 ? value8 : !r4;
|
|
r0 = r0 && a0.attachments.every(_fun83675);
|
|
r0 = value7 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.attachments.length})} : r4 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.attachments.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.attachments.length})} : {'type': 'text', 'text': null, 'trailingIcon': 'attachment',
|
|
text: intl.formatToPlainString(t['89ihS8'], {count: a0.attachments.length})};
|
|
return r0;
|
|
}
|
|
length = a0.embeds.length;
|
|
if (length > 0) {
|
|
value2 = a0.embeds.every(_fun83676);
|
|
value3 = !value2;
|
|
r5 = value2 ? value3 : a0.embeds.every(_fun83677);
|
|
r0 = value2 ? value3 : !r5;
|
|
r0 = r0 && a0.embeds.every(_fun83678);
|
|
r0 = value2 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.embeds.length})} : r5 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.embeds.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.embeds.length})} : a0.embeds.length > 0 && a0.embeds[0].rawTitle != null ? {type: 'markup',
|
|
|
|
markup: a0.embeds[0].rawTitle} : a0.embeds.length > 0 && a0.embeds[0].rawDescription != null ? {type: 'markup',
|
|
|
|
|
|
|
|
markup: a0.embeds[0].rawDescription} : {'type': 'text', 'text': null, 'trailingIcon': 'link',
|
|
text: intl.formatToPlainString(t['9XuYjs'], {count: a0.embeds.length})};
|
|
return r0;
|
|
}
|
|
length = a0.stickerItems.length;
|
|
if (length > 0) {
|
|
return {'type': 'text', 'text': null, 'trailingIcon': 'sticker', text: a0.stickerItems[0].name};
|
|
}
|
|
if (a0.isPoll()) {
|
|
value = undefined;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
ImizdM = t.ImizdM;
|
|
poll = a0.poll;
|
|
return {type: 'text', text: Reflect.apply(formatToPlainString, intl, [ImizdM,
|
|
{question: poll == null ? value : poll.question.text}])};
|
|
}
|
|
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(a0)) {
|
|
object2 = {type: 'text'};
|
|
object2.text = intl.string(t['9ddYKt']);
|
|
return object2;
|
|
}
|
|
return undefined;
|
|
}
|
|
content = a0.content;
|
|
if (content !== '') {
|
|
return {type: 'message', message: a0};
|
|
}
|
|
hasFlag = a0.hasFlag;
|
|
value = environment.__proto__;
|
|
if (Reflect.apply(hasFlag, a0, [MessageFlags.IS_VOICE_MESSAGE])) {
|
|
return {type: 'text', text: intl.string(t.slFYgi)};
|
|
}
|
|
length = a0.attachments.length;
|
|
if (length > 0) {
|
|
value7 = a0.attachments.every(_fun83673);
|
|
value8 = !value7;
|
|
r4 = value7 ? value8 : a0.attachments.every(_fun83674);
|
|
r0 = value7 ? value8 : !r4;
|
|
r0 = r0 && a0.attachments.every(_fun83675);
|
|
r0 = value7 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.attachments.length})} : r4 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.attachments.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.attachments.length})} : {'type': 'text', 'text': null, 'trailingIcon': 'attachment',
|
|
text: intl.formatToPlainString(t['89ihS8'], {count: a0.attachments.length})};
|
|
return r0;
|
|
}
|
|
length = a0.embeds.length;
|
|
if (length > 0) {
|
|
value2 = a0.embeds.every(_fun83676);
|
|
value3 = !value2;
|
|
r5 = value2 ? value3 : a0.embeds.every(_fun83677);
|
|
r0 = value2 ? value3 : !r5;
|
|
r0 = r0 && a0.embeds.every(_fun83678);
|
|
r0 = value2 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.embeds.length})} : r5 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.embeds.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.embeds.length})} : a0.embeds.length > 0 && a0.embeds[0].rawTitle != null ? {type: 'markup',
|
|
markup: a0.embeds[0].rawTitle} : a0.embeds.length > 0 && a0.embeds[0].rawDescription != null ? {type: 'markup',
|
|
|
|
|
|
markup: a0.embeds[0].rawDescription} : {'type': 'text', 'text': null, 'trailingIcon': 'link',
|
|
text: intl.formatToPlainString(t['9XuYjs'], {count: a0.embeds.length})};
|
|
return r0;
|
|
}
|
|
length = a0.stickerItems.length;
|
|
if (length > 0) {
|
|
return {'type': 'text', 'text': null, 'trailingIcon': 'sticker', text: a0.stickerItems[0].name};
|
|
}
|
|
if (a0.isPoll()) {
|
|
value = undefined;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
ImizdM = t.ImizdM;
|
|
poll = a0.poll;
|
|
return {type: 'text', text: Reflect.apply(formatToPlainString, intl, [ImizdM,
|
|
{question: poll == null ? value : poll.question.text}])};
|
|
}
|
|
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(a0)) {
|
|
object2 = {type: 'text'};
|
|
object2.text = intl.string(t['9ddYKt']);
|
|
return object2;
|
|
}
|
|
} else {
|
|
embeds = a0.embeds;
|
|
var url = embeds[0].url;
|
|
content = a0.content;
|
|
if (url !== content) {
|
|
content = a0.content;
|
|
if (content == null) {
|
|
hasFlag = a0.hasFlag;
|
|
value = environment.__proto__;
|
|
if (Reflect.apply(hasFlag, a0, [MessageFlags.IS_VOICE_MESSAGE])) {
|
|
return {type: 'text', text: intl.string(t.slFYgi)};
|
|
}
|
|
length = a0.attachments.length;
|
|
if (length > 0) {
|
|
value7 = a0.attachments.every(_fun83673);
|
|
value8 = !value7;
|
|
r4 = value7 ? value8 : a0.attachments.every(_fun83674);
|
|
r0 = value7 ? value8 : !r4;
|
|
r0 = r0 && a0.attachments.every(_fun83675);
|
|
r0 = value7 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.attachments.length})} : r4 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX,
|
|
{count: a0.attachments.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.attachments.length})} : {'type': 'text', 'text': null, 'trailingIcon': 'attachment',
|
|
text: intl.formatToPlainString(t['89ihS8'], {count: a0.attachments.length})};
|
|
return r0;
|
|
}
|
|
length = a0.embeds.length;
|
|
if (length > 0) {
|
|
value2 = a0.embeds.every(_fun83676);
|
|
value3 = !value2;
|
|
r5 = value2 ? value3 : a0.embeds.every(_fun83677);
|
|
r0 = value2 ? value3 : !r5;
|
|
r0 = r0 && a0.embeds.every(_fun83678);
|
|
r0 = value2 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.embeds.length})} : r5 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.embeds.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.embeds.length})} : a0.embeds.length > 0 && a0.embeds[0].rawTitle != null ? {type: 'markup',
|
|
|
|
|
|
markup: a0.embeds[0].rawTitle} : a0.embeds.length > 0 && a0.embeds[0].rawDescription != null ? {type: 'markup',
|
|
|
|
|
|
|
|
|
|
markup: a0.embeds[0].rawDescription} : {'type': 'text', 'text': null, 'trailingIcon': 'link',
|
|
text: intl.formatToPlainString(t['9XuYjs'], {count: a0.embeds.length})};
|
|
return r0;
|
|
}
|
|
length = a0.stickerItems.length;
|
|
if (length > 0) {
|
|
return {'type': 'text', 'text': null, 'trailingIcon': 'sticker', text: a0.stickerItems[0].name};
|
|
}
|
|
if (a0.isPoll()) {
|
|
value = undefined;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
ImizdM = t.ImizdM;
|
|
poll = a0.poll;
|
|
return {type: 'text', text: Reflect.apply(formatToPlainString, intl, [ImizdM,
|
|
{question: poll == null ? value : poll.question.text}])};
|
|
}
|
|
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(a0)) {
|
|
object2 = {type: 'text'};
|
|
object2.text = intl.string(t['9ddYKt']);
|
|
return object2;
|
|
}
|
|
return undefined;
|
|
}
|
|
content = a0.content;
|
|
if (content !== '') {
|
|
return {type: 'message', message: a0};
|
|
}
|
|
hasFlag = a0.hasFlag;
|
|
value = environment.__proto__;
|
|
if (Reflect.apply(hasFlag, a0, [MessageFlags.IS_VOICE_MESSAGE])) {
|
|
return {type: 'text', text: intl.string(t.slFYgi)};
|
|
}
|
|
length = a0.attachments.length;
|
|
if (length > 0) {
|
|
value7 = a0.attachments.every(_fun83673);
|
|
value8 = !value7;
|
|
r4 = value7 ? value8 : a0.attachments.every(_fun83674);
|
|
r0 = value7 ? value8 : !r4;
|
|
r0 = r0 && a0.attachments.every(_fun83675);
|
|
r0 = value7 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.attachments.length})} : r4 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.attachments.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.attachments.length})} : {'type': 'text', 'text': null, 'trailingIcon': 'attachment',
|
|
text: intl.formatToPlainString(t['89ihS8'], {count: a0.attachments.length})};
|
|
return r0;
|
|
}
|
|
length = a0.embeds.length;
|
|
if (length > 0) {
|
|
value2 = a0.embeds.every(_fun83676);
|
|
value3 = !value2;
|
|
r5 = value2 ? value3 : a0.embeds.every(_fun83677);
|
|
r0 = value2 ? value3 : !r5;
|
|
r0 = r0 && a0.embeds.every(_fun83678);
|
|
r0 = value2 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.embeds.length})} : r5 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.embeds.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.embeds.length})} : a0.embeds.length > 0 && a0.embeds[0].rawTitle != null ? {type: 'markup',
|
|
|
|
markup: a0.embeds[0].rawTitle} : a0.embeds.length > 0 && a0.embeds[0].rawDescription != null ? {type: 'markup',
|
|
|
|
|
|
|
|
markup: a0.embeds[0].rawDescription} : {'type': 'text', 'text': null, 'trailingIcon': 'link',
|
|
text: intl.formatToPlainString(t['9XuYjs'], {count: a0.embeds.length})};
|
|
return r0;
|
|
}
|
|
length = a0.stickerItems.length;
|
|
if (length > 0) {
|
|
return {'type': 'text', 'text': null, 'trailingIcon': 'sticker', text: a0.stickerItems[0].name};
|
|
}
|
|
if (a0.isPoll()) {
|
|
value = undefined;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
ImizdM = t.ImizdM;
|
|
poll = a0.poll;
|
|
return {type: 'text', text: Reflect.apply(formatToPlainString, intl, [ImizdM,
|
|
{question: poll == null ? value : poll.question.text}])};
|
|
}
|
|
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(a0)) {
|
|
object2 = {type: 'text'};
|
|
object2.text = intl.string(t['9ddYKt']);
|
|
return object2;
|
|
}
|
|
return undefined;
|
|
}
|
|
embeds = a0.embeds;
|
|
if (embeds[0].rawTitle != null) {
|
|
return {type: 'markup', markup: a0.embeds[0].rawTitle};
|
|
}
|
|
content = a0.content;
|
|
if (content == null) {
|
|
hasFlag = a0.hasFlag;
|
|
value = environment.__proto__;
|
|
if (Reflect.apply(hasFlag, a0, [MessageFlags.IS_VOICE_MESSAGE])) {
|
|
return {type: 'text', text: intl.string(t.slFYgi)};
|
|
}
|
|
length = a0.attachments.length;
|
|
if (length > 0) {
|
|
value7 = a0.attachments.every(_fun83673);
|
|
value8 = !value7;
|
|
r4 = value7 ? value8 : a0.attachments.every(_fun83674);
|
|
r0 = value7 ? value8 : !r4;
|
|
r0 = r0 && a0.attachments.every(_fun83675);
|
|
r0 = value7 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.attachments.length})} : r4 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.attachments.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.attachments.length})} : {'type': 'text', 'text': null, 'trailingIcon': 'attachment',
|
|
text: intl.formatToPlainString(t['89ihS8'], {count: a0.attachments.length})};
|
|
return r0;
|
|
}
|
|
length = a0.embeds.length;
|
|
if (length > 0) {
|
|
value2 = a0.embeds.every(_fun83676);
|
|
value3 = !value2;
|
|
r5 = value2 ? value3 : a0.embeds.every(_fun83677);
|
|
r0 = value2 ? value3 : !r5;
|
|
r0 = r0 && a0.embeds.every(_fun83678);
|
|
r0 = value2 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.embeds.length})} : r5 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.embeds.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.embeds.length})} : a0.embeds.length > 0 && a0.embeds[0].rawTitle != null ? {type: 'markup',
|
|
|
|
markup: a0.embeds[0].rawTitle} : a0.embeds.length > 0 && a0.embeds[0].rawDescription != null ? {type: 'markup',
|
|
|
|
|
|
|
|
markup: a0.embeds[0].rawDescription} : {'type': 'text', 'text': null, 'trailingIcon': 'link',
|
|
text: intl.formatToPlainString(t['9XuYjs'], {count: a0.embeds.length})};
|
|
return r0;
|
|
}
|
|
length = a0.stickerItems.length;
|
|
if (length > 0) {
|
|
return {'type': 'text', 'text': null, 'trailingIcon': 'sticker', text: a0.stickerItems[0].name};
|
|
}
|
|
if (a0.isPoll()) {
|
|
value = undefined;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
ImizdM = t.ImizdM;
|
|
poll = a0.poll;
|
|
return {type: 'text', text: Reflect.apply(formatToPlainString, intl, [ImizdM,
|
|
{question: poll == null ? value : poll.question.text}])};
|
|
}
|
|
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(a0)) {
|
|
object2 = {type: 'text'};
|
|
object2.text = intl.string(t['9ddYKt']);
|
|
return object2;
|
|
}
|
|
return undefined;
|
|
}
|
|
content = a0.content;
|
|
if (content !== '') {
|
|
return {type: 'message', message: a0};
|
|
}
|
|
hasFlag = a0.hasFlag;
|
|
value = environment.__proto__;
|
|
if (Reflect.apply(hasFlag, a0, [MessageFlags.IS_VOICE_MESSAGE])) {
|
|
return {type: 'text', text: intl.string(t.slFYgi)};
|
|
}
|
|
length = a0.attachments.length;
|
|
if (length > 0) {
|
|
value7 = a0.attachments.every(_fun83673);
|
|
value8 = !value7;
|
|
r4 = value7 ? value8 : a0.attachments.every(_fun83674);
|
|
r0 = value7 ? value8 : !r4;
|
|
r0 = r0 && a0.attachments.every(_fun83675);
|
|
r0 = value7 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.attachments.length})} : r4 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.attachments.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.attachments.length})} : {'type': 'text', 'text': null, 'trailingIcon': 'attachment',
|
|
text: intl.formatToPlainString(t['89ihS8'], {count: a0.attachments.length})};
|
|
return r0;
|
|
}
|
|
embeds = a0.embeds;
|
|
length = embeds.length;
|
|
if (length > 0) {
|
|
value2 = a0.embeds.every(_fun83676);
|
|
value3 = !value2;
|
|
r5 = value2 ? value3 : a0.embeds.every(_fun83677);
|
|
r0 = value2 ? value3 : !r5;
|
|
r0 = r0 && a0.embeds.every(_fun83678);
|
|
r0 = value2 ? {'type': 'text', 'text': null, 'trailingIcon': 'image',
|
|
text: intl.formatToPlainString(t.h4pFfU,
|
|
{count: a0.embeds.length})} : r5 ? {'type': 'text', 'text': null, 'trailingIcon': 'video',
|
|
text: intl.formatToPlainString(t.SJ6pPX, {count: a0.embeds.length})} : r0 ? {'type': 'text',
|
|
'text': null,
|
|
'trailingIcon': 'audio', text: intl.formatToPlainString(t.fnO3hK,
|
|
{count: a0.embeds.length})} : a0.embeds.length > 0 && a0.embeds[0].rawTitle != null ? {type: 'markup',
|
|
markup: a0.embeds[0].rawTitle} : a0.embeds.length > 0 && a0.embeds[0].rawDescription != null ? {type: 'markup',
|
|
|
|
|
|
markup: a0.embeds[0].rawDescription} : {'type': 'text', 'text': null, 'trailingIcon': 'link',
|
|
text: intl.formatToPlainString(t['9XuYjs'], {count: a0.embeds.length})};
|
|
return r0;
|
|
}
|
|
length = a0.stickerItems.length;
|
|
if (length > 0) {
|
|
return {'type': 'text', 'text': null, 'trailingIcon': 'sticker', text: a0.stickerItems[0].name};
|
|
}
|
|
if (a0.isPoll()) {
|
|
value = undefined;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
ImizdM = t.ImizdM;
|
|
poll = a0.poll;
|
|
return {type: 'text', text: Reflect.apply(formatToPlainString, intl, [ImizdM,
|
|
{question: poll == null ? value : poll.question.text}])};
|
|
}
|
|
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(a0)) {
|
|
object2 = {type: 'text'};
|
|
object2.text = intl.string(t['9ddYKt']);
|
|
return object2;
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun83680() { // fn#83680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:6345, offset: 0x01f24a1f, size: 72 bytes, params: 1, frame: 13
|
|
const isBlocked = RelationshipStore.isBlocked;
|
|
const binding = env0_0;
|
|
return {isBlocked: Reflect.apply(isBlocked, RelationshipStore, [binding.author.id]),
|
|
isIgnored: RelationshipStore.isIgnored(binding.author.id)};
|
|
}
|
|
|
|
function _fun83682() { // fn#83682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:6689, offset: 0x01f24a67, size: 63 bytes, params: 1, frame: 13
|
|
return env0_0.mentions.length > 0 ? UserStore.getUser(env0_0.mentions[0]) : undefined;
|
|
}
|
|
|
|
function _fun83673({filename}) { // fn#83673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:1162, offset: 0x01f2472c, size: 47 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (require(4631) /* metro dependency 4631: MediaFormatTesters */).isImageFile(filename);
|
|
}
|
|
|
|
function _fun83674({filename}) { // fn#83674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:1226, offset: 0x01f2475b, size: 47 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (require(4631) /* metro dependency 4631: MediaFormatTesters */).isVideoFile(filename);
|
|
}
|
|
|
|
function _fun83675({filename}) { // fn#83675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:1294, offset: 0x01f2478a, size: 47 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (require(4631) /* metro dependency 4631: MediaFormatTesters */).isAudioFile(filename);
|
|
}
|
|
|
|
function _fun83676(a0) { // fn#83676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:1876, offset: 0x01f247b9, size: 60 bytes, params: 2, frame: 13
|
|
var r0;
|
|
let value = a0.url != null;
|
|
if (value) {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
|
value = value.isImageUrl(a0.url);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun83677(a0) { // fn#83677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:1942, offset: 0x01f247f5, size: 60 bytes, params: 2, frame: 13
|
|
var r0;
|
|
let value = a0.url != null;
|
|
if (value) {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
|
value = value.isVideoUrl(a0.url);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun83678(a0) { // fn#83678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11105:2012, offset: 0x01f24831, size: 60 bytes, params: 2, frame: 13
|
|
var r0;
|
|
let value = a0.url != null;
|
|
if (value) {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
|
value = value.isAudioFile(a0.url);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|