Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
35 lines
1.5 KiB
TypeScript
35 lines
1.5 KiB
TypeScript
// Module ID: 14110
|
|
// Function ID: 14111
|
|
// Name: trackAckMessages
|
|
// Dependencies: [2045, 7877, 2067, 4939, 1078, 4938, 2]
|
|
// Exports: default
|
|
|
|
// Module 14110 (trackAckMessages)
|
|
import AppAnalyticsUtils from "AppAnalyticsUtils" /* 4938 */;
|
|
import ChannelStore from "ChannelStore" /* 2045 */;
|
|
import GuildReadStateStore from "GuildReadStateStore" /* 7877 */;
|
|
import GuildStore from "GuildStore" /* 2067 */;
|
|
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 4939 */;
|
|
|
|
require = fn;
|
|
const AnalyticEvents = fn(1078).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);
|
|
};
|