decord/source/modules/conversations/ConversationsAnalytics.tsx
2026-08-08 06:10:11 +00:00

221 lines
6.3 KiB
TypeScript

// Module ID: 8558
// Function ID: 8559
// Name: ConversationsAnalytics
// Dependencies: [1372, 676, 698, 2]
// Module 8558 (ConversationsAnalytics)
import ensureGuildLoaded from "ensureGuildLoaded";
import { AnalyticEvents } from "ME";
const result = require("expandEventProperties").fileFinishedImporting("modules/conversations/ConversationsAnalytics.tsx");
export const ConversationsAnalytics = {
trackEntrypointImpression(channelId) {
let obj = importDefault(698);
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj = {};
obj[2] = guild_id;
const merged = Object.assign(obj);
obj.conversation_count = channelId.conversationCount;
obj.track(AnalyticEvents.TOPICAL_NAV_ENTRYPOINT_IMPRESSION, obj);
},
trackTopicsUnitImpression(channelId) {
let obj = importDefault(698);
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj = {};
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationIds: obj3.conversation_ids, isFocusMode: obj3.is_focus_mode } = channelId);
obj.track(AnalyticEvents.TOPICAL_NAV_TOPICS_UNIT_IMPRESSION, obj);
},
trackPreviewImpression(channelId) {
let obj = importDefault(698);
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj = {};
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode } = channelId);
obj.track(AnalyticEvents.TOPICAL_NAV_PREVIEW_IMPRESSION, obj);
},
trackTopicsUnitClicked(channelId) {
let obj = importDefault(698);
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj = {};
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode } = channelId);
obj.track(AnalyticEvents.TOPICAL_NAV_TOPICS_UNIT_CLICKED, obj);
},
trackFocusModeImpression(channelId) {
let obj = importDefault(698);
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj = {};
obj[2] = guild_id;
const merged = Object.assign(obj);
obj.conversation_id = channelId.conversationId;
obj.track(AnalyticEvents.TOPICAL_NAV_FOCUS_MODE_IMPRESSION, obj);
},
trackFocusModeDismissed(channelId) {
let obj = importDefault(698);
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj = {};
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationId: obj3.conversation_id, dismissReason: obj3.dismiss_reason } = channelId);
obj.track(AnalyticEvents.TOPICAL_NAV_FOCUS_MODE_DISMISSED, obj);
},
trackThumbsClicked(channelId) {
let obj = importDefault(698);
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj = {};
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationId: obj3.conversation_id, isThumbsUp: obj3.is_thumbs_up, isFocusMode: obj3.is_focus_mode } = channelId);
obj.track(AnalyticEvents.TOPICAL_NAV_THUMBS_CLICKED, obj);
},
trackThumbsDownReasonSelected(channelId) {
let obj = importDefault(698);
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
obj = {};
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode, reasons: obj3.reasons, otherText: obj3.other_text } = channelId);
obj.track(AnalyticEvents.TOPICAL_NAV_THUMBS_DOWN_REASON_SELECTED, obj);
}
};