decord/alpha/source/modules/read_states/trackAckMessages.tsx
github-actions 52331fb8ae chore: update source for alpha 349.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5051.js (118.4 MB)
2026-09-30 07:29:52 +00:00

35 lines
1.5 KiB
TypeScript

// Module ID: 13579
// Function ID: 13580
// Name: trackAckMessages
// Dependencies: [2045, 7245, 2067, 5047, 1074, 5046, 2]
// Exports: default
// Module 13579 (trackAckMessages)
import AppAnalyticsUtils from "AppAnalyticsUtils" /* 5046 */;
import ChannelStore from "ChannelStore" /* 2045 */;
import GuildReadStateStore from "GuildReadStateStore" /* 7245 */;
import GuildStore from "GuildStore" /* 2067 */;
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 5047 */;
require = fn;
const AnalyticEvents = fn(1074).AnalyticEvents;
const size = fn(2);
const result = size.fileFinishedImporting("modules/read_states/trackAckMessages.tsx");
export default function trackAckMessages(channel_id, location) {
const channel = ChannelStore.getChannel(channel_id);
const obj = { channel_id, guild_id: null, location: null, guild_unread_statuses: null };
let guildId;
if (null != channel) {
guildId = channel.getGuildId();
}
obj.guild_id = guildId;
obj.location = location;
const guildsArray = GuildStore.getGuildsArray();
obj.guild_unread_statuses = guildsArray.map((id) => {
const mentionCount = GuildReadStateStore.getMentionCount(id.id);
const hasUnreadResult = GuildReadStateStore.hasUnread(id.id);
return "" + id.id + "," + hasUnreadResult + "," + mentionCount + "," + UserGuildSettingsStore.isMuted(id.id) + "," + UserGuildSettingsStore.resolveGuildUnreadSetting(id);
});
AppAnalyticsUtils.trackWithMetadata(AnalyticEvents.ACK_MESSAGES, obj);
};