decord/source/modules/conversations/ConversationsAnalytics.tsx

210 lines
6.5 KiB
TypeScript
Raw Normal View History

// Module ID: 8025
// Function ID: 8026
2026-07-29 08:29:29 +00:00
// Name: ConversationsAnalytics
// Dependencies: [1958, 1074, 1241, 2]
2026-07-23 10:11:24 +00:00
// Module 8025 (ConversationsAnalytics)
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
import ChannelStore from "ChannelStore" /* 1958 */;
2026-07-20 16:05:17 +00:00
const AnalyticEvents = fn(1074).AnalyticEvents;
const size = fn(2);
const result = size.fileFinishedImporting("modules/conversations/ConversationsAnalytics.tsx");
2026-07-20 16:05:17 +00:00
export const ConversationsAnalytics = {
trackEntrypointImpression(channelId) {
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
2026-07-29 08:29:29 +00:00
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
2026-07-29 08:29:29 +00:00
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
const obj3 = {};
obj2.guild_id = guild_id;
const merged = Object.assign(obj2);
obj3.conversation_count = channelId.conversationCount;
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_ENTRYPOINT_IMPRESSION, obj3);
2026-07-20 16:05:17 +00:00
},
trackTopicsUnitImpression(channelId) {
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
2026-07-29 08:29:29 +00:00
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
2026-07-29 08:29:29 +00:00
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj2.guild_id = guild_id;
const merged = Object.assign(obj2);
2026-07-29 08:29:29 +00:00
({ conversationIds: obj3.conversation_ids, isFocusMode: obj3.is_focus_mode } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_TOPICS_UNIT_IMPRESSION, {});
2026-07-20 16:05:17 +00:00
},
trackPreviewImpression(channelId) {
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
2026-07-29 08:29:29 +00:00
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
2026-07-29 08:29:29 +00:00
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj2.guild_id = guild_id;
const merged = Object.assign(obj2);
2026-07-29 08:29:29 +00:00
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_PREVIEW_IMPRESSION, {});
2026-07-20 16:05:17 +00:00
},
trackTopicsUnitClicked(channelId) {
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
2026-07-29 08:29:29 +00:00
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
2026-07-29 08:29:29 +00:00
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj2.guild_id = guild_id;
const merged = Object.assign(obj2);
2026-07-29 08:29:29 +00:00
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_TOPICS_UNIT_CLICKED, {});
2026-07-20 16:05:17 +00:00
},
trackFocusModeImpression(channelId) {
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
2026-07-29 08:29:29 +00:00
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
2026-07-29 08:29:29 +00:00
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
const obj3 = {};
obj2.guild_id = guild_id;
const merged = Object.assign(obj2);
obj3.conversation_id = channelId.conversationId;
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_FOCUS_MODE_IMPRESSION, obj3);
2026-07-20 16:05:17 +00:00
},
trackFocusModeDismissed(channelId) {
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
2026-07-29 08:29:29 +00:00
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
2026-07-29 08:29:29 +00:00
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj2.guild_id = guild_id;
const merged = Object.assign(obj2);
2026-07-29 08:29:29 +00:00
({ conversationId: obj3.conversation_id, dismissReason: obj3.dismiss_reason } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_FOCUS_MODE_DISMISSED, {});
2026-07-20 16:05:17 +00:00
},
trackThumbsClicked(channelId) {
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
2026-07-29 08:29:29 +00:00
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
2026-07-29 08:29:29 +00:00
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj2.guild_id = guild_id;
const merged = Object.assign(obj2);
2026-07-29 08:29:29 +00:00
({ conversationId: obj3.conversation_id, isThumbsUp: obj3.is_thumbs_up, isFocusMode: obj3.is_focus_mode } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_THUMBS_CLICKED, {});
2026-07-20 16:05:17 +00:00
},
trackThumbsDownReasonSelected(channelId) {
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
2026-07-29 08:29:29 +00:00
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
2026-07-29 08:29:29 +00:00
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj2.guild_id = guild_id;
const merged = Object.assign(obj2);
2026-07-29 08:29:29 +00:00
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode, reasons: obj3.reasons, otherText: obj3.other_text } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_THUMBS_DOWN_REASON_SELECTED, {});
2026-07-20 16:05:17 +00:00
}
};