decord/source/modules/guild/markGuildsAsRead.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

95 lines
3.6 KiB
TypeScript

// Module ID: 13963
// Function ID: 13964
// Name: markGuildsAsRead
// Dependencies: [7100, 5506, 1957, 2012, 4575, 1074, 4742, 12, 11, 1242, 7110, 2]
// Exports: default
// Module 13963 (markGuildsAsRead)
import applyDefault from "apply" /* 12 */;
import expandEventPropertiesDefault from "expandEventProperties" /* 1242 */;
import closure_3 from "handleUpdate" /* 7100 */;
import closure_4 from "rebuild" /* 5506 */;
import closure_5 from "ensureGuildLoaded" /* 1957 */;
import closure_6 from "comparator" /* 2012 */;
import closure_7 from "generateOldThreadCutoff" /* 4575 */;
import { AnalyticEvents } from "ME" /* 1074 */;
import { ReadStateTypes } from "ReadStateTypes" /* 4742 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/guild/markGuildsAsRead.tsx");
export default function markGuildsAsRead(arr, source, onFinished) {
let obj = applyDefault;
const mapped = obj.flatMap(arr, (closure_0) => {
const selectableChannelIds = store.getSelectableChannelIds(closure_0);
const vocalChannelIds = store.getVocalChannelIds(closure_0);
const items = [...vocalChannelIds];
activeJoinedThreadsForGuild = activeJoinedThreadsForGuild.getActiveJoinedThreadsForGuild(closure_0);
const iter = selectableChannelIds[Symbol.iterator]();
while (iter !== undefined) {
let obj = activeJoinedThreadsForGuild[iter.next()];
if (obj == null) {
obj = {};
}
let tmp4 = obj;
for (const key10027 in obj) {
let tmp5 = key10027;
let arr = items.push(key10027);
continue;
}
continue;
}
return items;
}).map((channelId) => {
const obj = { channelId, readStateType: constants.CHANNEL, messageId: null };
channel = channel.getChannel(channelId);
let isForumLikeChannelResult;
if (channel != null) {
isForumLikeChannelResult = channel.isForumLikeChannel();
}
if (isForumLikeChannelResult) {
const _Date = Date;
let fromTimestampResult = callback(table[8]).fromTimestamp(Date.now());
const obj3 = callback(table[8]);
} else {
fromTimestampResult = closure_7.lastMessageId(channelId);
}
obj[2] = fromTimestampResult;
return obj;
});
const item = arr.forEach((id) => {
let obj = { channelId: closure_1_1(closure_1_2[8]).cast(id), readStateType: closure_1_9.GUILD_EVENT, messageId: closure_1_7.lastMessageId(id, closure_1_9.GUILD_EVENT) };
mapped.push(obj);
obj = { channelId: null, readStateType: null, messageId: null };
const obj2 = closure_1_1(closure_1_2[8]);
obj[0] = closure_1_1(closure_1_2[8]).cast(id);
obj[1] = closure_1_9.GUILD_ONBOARDING_QUESTION;
obj[2] = closure_1_3.ackIdForGuild(id);
mapped.push(obj);
});
const flatMapResult = obj.flatMap(arr, (closure_0) => {
const selectableChannelIds = store.getSelectableChannelIds(closure_0);
const vocalChannelIds = store.getVocalChannelIds(closure_0);
const items = [...vocalChannelIds];
activeJoinedThreadsForGuild = activeJoinedThreadsForGuild.getActiveJoinedThreadsForGuild(closure_0);
const iter = selectableChannelIds[Symbol.iterator]();
while (iter !== undefined) {
let obj = activeJoinedThreadsForGuild[iter.next()];
if (obj == null) {
obj = {};
}
let tmp4 = obj;
for (const key10027 in obj) {
let tmp5 = key10027;
let arr = items.push(key10027);
continue;
}
continue;
}
return items;
});
obj = { source, type: "guild" };
expandEventPropertiesDefault.track(AnalyticEvents.MARK_AS_READ, obj);
let obj2 = expandEventPropertiesDefault;
return mapped(7110).bulkAck(mapped, onFinished);
};