Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
79 lines
3.2 KiB
TypeScript
79 lines
3.2 KiB
TypeScript
// Module ID: 12235
|
|
// Function ID: 12236
|
|
// Name: tryInjectMessage
|
|
// Dependencies: [502, 1074, 8026, 5010, 1385, 12236, 12237, 2]
|
|
// Exports: tryCreateInjectedMessage
|
|
|
|
// Module 12235 (tryInjectMessage)
|
|
import FlagUtils from "FlagUtils" /* 1385 */;
|
|
import MessageRecordUtils from "MessageRecordUtils" /* 5010 */;
|
|
import createMessageDefault from "createMessage" /* 8026 */;
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
|
|
|
require = fn;
|
|
const Constants = fn(1074);
|
|
({ MessageFlags: closure_4, MessageStates: hasOwnProperty, MessageTypes: metroRequire } = Constants);
|
|
const map = new Map();
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/messages/tryInjectMessage.tsx");
|
|
|
|
export const tryCreateInjectedMessage = function tryCreateInjectedMessage(id, id2) {
|
|
if (map.get(id2.id) === id.id) {
|
|
const obj3 = { channelId: id2.id, type: constants3.IN_GAME_MESSAGE_NUX, content: "", author: id.author, flags: constants.EPHEMERAL, state: constants2.SENT };
|
|
const tmp19 = createMessageDefault(obj3);
|
|
const messageRecord = MessageRecordUtils.createMessageRecord(tmp19);
|
|
({ applicationId: tmp21.applicationId, timestamp: tmp21.timestamp } = id);
|
|
let tmp4 = messageRecord;
|
|
} else {
|
|
tmp4 = null;
|
|
if (null != id.applicationId) {
|
|
tmp4 = null;
|
|
if (obj2.hasFlag(id.flags, constants.SENT_BY_SOCIAL_LAYER_INTEGRATION)) {
|
|
tmp4 = null;
|
|
if (id2.isDM()) {
|
|
tmp4 = null;
|
|
if (id.author.id !== AuthenticationStore.getId()) {
|
|
tmp4 = null;
|
|
if (null == id.activity) {
|
|
let num = id2.recipientFlags;
|
|
if (num == null) {
|
|
num = 0;
|
|
}
|
|
tmp4 = null;
|
|
if (!tmpResult.hasFlag(num, tmp(12236).ChannelRecipientPrivateUserDataFlags.DISMISSED_IN_GAME_MESSAGE_NUX)) {
|
|
tmp4 = null;
|
|
if (!obj.has(id2.id)) {
|
|
const obj4 = { channelId: id2.id, type: constants3.IN_GAME_MESSAGE_NUX, content: "", author: id.author, flags: tmp3.EPHEMERAL, state: constants2.SENT };
|
|
const tmp6 = importDefault;
|
|
const tmp9 = createMessageDefault(obj4);
|
|
const messageRecord1 = tmp(5010).createMessageRecord(tmp9);
|
|
({ applicationId: tmp10.applicationId, timestamp: tmp10.timestamp } = id);
|
|
const result = obj.set(id2.id, id.id);
|
|
const tmpResult3 = tmp(5010);
|
|
let num2 = id2.recipientFlags;
|
|
if (num2 == null) {
|
|
num2 = 0;
|
|
}
|
|
const tmpResult4 = tmp(1385);
|
|
const setFlagResult = tmp(1385).setFlag(num2, tmp(12236).ChannelRecipientPrivateUserDataFlags.DISMISSED_IN_GAME_MESSAGE_NUX, true);
|
|
const result1 = tmp6(12237).updatePrivateChannelRecipientFlags(id2.id, setFlagResult);
|
|
tmp4 = messageRecord1;
|
|
const tmp6Result = tmp6(12237);
|
|
}
|
|
}
|
|
tmpResult = tmp(1385);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
obj2 = FlagUtils;
|
|
tmp3 = constants;
|
|
}
|
|
}
|
|
let tmp22 = null;
|
|
if (null != tmp4) {
|
|
const obj5 = { message: tmp4, position: "before" };
|
|
tmp22 = obj5;
|
|
}
|
|
return tmp22;
|
|
};
|