decord/stable/source/modules/read_states/trackAckMessages.tsx
github-actions 57c2214117 chore: update source for stable 347.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-29 21:26:22 +00:00

35 lines
1.5 KiB
TypeScript

// Module ID: 14137
// Function ID: 14138
// Name: trackAckMessages
// Dependencies: [2041, 7904, 2063, 4969, 1074, 4968, 2]
// Exports: default
// Module 14137 (trackAckMessages)
import AppAnalyticsUtils from "AppAnalyticsUtils" /* 4968 */;
import ChannelStore from "ChannelStore" /* 2041 */;
import GuildReadStateStore from "GuildReadStateStore" /* 7904 */;
import GuildStore from "GuildStore" /* 2063 */;
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 4969 */;
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);
};