decord/beta/source/modules/conversations/ConversationsAnalytics.tsx
github-actions e7a050048e chore: update source for beta 347.7
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-21 19:31:18 +00:00

209 lines
6.5 KiB
TypeScript

// Module ID: 8158
// Function ID: 8159
// Name: ConversationsAnalytics
// Dependencies: [2045, 1078, 1245, 2]
// Module 8158 (ConversationsAnalytics)
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1245 */;
import ChannelStore from "ChannelStore" /* 2045 */;
const AnalyticEvents = fn(1078).AnalyticEvents;
const size = fn(2);
const result = size.fileFinishedImporting("modules/conversations/ConversationsAnalytics.tsx");
export const ConversationsAnalytics = {
trackEntrypointImpression(channelId) {
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
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);
},
trackTopicsUnitImpression(channelId) {
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
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);
({ conversationIds: obj3.conversation_ids, isFocusMode: obj3.is_focus_mode } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_TOPICS_UNIT_IMPRESSION, {});
},
trackPreviewImpression(channelId) {
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
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);
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_PREVIEW_IMPRESSION, {});
},
trackTopicsUnitClicked(channelId) {
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
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);
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_TOPICS_UNIT_CLICKED, {});
},
trackFocusModeImpression(channelId) {
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
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);
},
trackFocusModeDismissed(channelId) {
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
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);
({ conversationId: obj3.conversation_id, dismissReason: obj3.dismiss_reason } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_FOCUS_MODE_DISMISSED, {});
},
trackThumbsClicked(channelId) {
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
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);
({ conversationId: obj3.conversation_id, isThumbsUp: obj3.is_thumbs_up, isFocusMode: obj3.is_focus_mode } = channelId);
AnalyticsUtilsDefault.track(AnalyticEvents.TOPICAL_NAV_THUMBS_CLICKED, {});
},
trackThumbsDownReasonSelected(channelId) {
channelId = channelId.channelId;
const channel = ChannelStore.getChannel(channelId);
const obj2 = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj2.channel_type = type;
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);
({ 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, {});
}
};