decord/source/modules/read_states/trackAckMessages.tsx

35 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 13120
// Function ID: 13121
2026-07-20 16:05:17 +00:00
// Name: trackAckMessages
2026-08-24 06:08:38 +00:00
// Dependencies: [1391, 5388, 1910, 5048, 676, 5047, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 13120 (trackAckMessages)
import collectGuildAnalyticsMetadata from "collectGuildAnalyticsMetadata" /* 5047 */;
import closure_2 from "ensureGuildLoaded" /* 1391 */;
import closure_3 from "updateGuildUnreadSentinel" /* 5388 */;
import closure_4 from "createGuildRecordFromRust" /* 1910 */;
import closure_5 from "updateUserGuildSettingsInternal" /* 5048 */;
import { AnalyticEvents } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").fileFinishedImporting("modules/read_states/trackAckMessages.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default function trackAckMessages(channel_id) {
2026-07-23 10:11:24 +00:00
channel = channel.getChannel(channel_id);
2026-07-29 08:29:29 +00:00
const obj = { channel_id, guild_id: null, location: null, guild_unread_statuses: null };
2026-07-20 16:05:17 +00:00
let guildId;
if (null != channel) {
guildId = channel.getGuildId();
}
2026-07-29 08:29:29 +00:00
obj[1] = guildId;
obj[2] = arg1;
2026-07-23 10:11:24 +00:00
guildsArray = guildsArray.getGuildsArray();
2026-07-29 08:29:29 +00:00
obj[3] = guildsArray.map((id) => {
2026-08-24 06:08:38 +00:00
const mentionCount = closure_3.getMentionCount(id.id);
const hasUnreadResult = closure_3.hasUnread(id.id);
return "" + id.id + "," + hasUnreadResult + "," + mentionCount + "," + closure_5.isMuted(id.id) + "," + closure_5.resolveGuildUnreadSetting(id);
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
collectGuildAnalyticsMetadata.trackWithMetadata(AnalyticEvents.ACK_MESSAGES, obj);
2026-07-20 16:05:17 +00:00
};