decord/source/modules/read_states/trackAckMessages.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

35 lines
1.5 KiB
TypeScript

// Module ID: 13913
// Function ID: 13914
// Name: trackAckMessages
// Dependencies: [1957, 7687, 1979, 4786, 1074, 4785, 2]
// Exports: default
// Module 13913 (trackAckMessages)
import AppAnalyticsUtils from "AppAnalyticsUtils" /* 4785 */;
import ChannelStore from "ChannelStore" /* 1957 */;
import GuildReadStateStore from "GuildReadStateStore" /* 7687 */;
import GuildStore from "GuildStore" /* 1979 */;
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 4786 */;
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);
};