decord/alpha/source/modules/channel/trackWaveCtaClicked.tsx

33 lines
1.2 KiB
TypeScript
Raw Normal View History

// Module ID: 12607
// Function ID: 12608
// Name: trackWaveCtaClicked
// Dependencies: [2044, 1074, 1241, 2]
2026-07-29 08:29:29 +00:00
// Exports: getDmHasMessageHistory, trackWaveCtaClicked
2026-07-20 16:05:17 +00:00
// Module 12607 (trackWaveCtaClicked)
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
import ChannelStore from "ChannelStore" /* 2044 */;
2026-07-23 10:11:24 +00:00
const AnalyticEvents = fn(1074).AnalyticEvents;
const size = fn(2);
const result = size.fileFinishedImporting("modules/channel/trackWaveCtaClicked.tsx");
2026-07-29 08:29:29 +00:00
export const getDmHasMessageHistory = function getDmHasMessageHistory(arg0) {
const channel = ChannelStore.getChannel(arg0);
2026-07-20 16:05:17 +00:00
let lastMessageId;
2026-07-29 08:29:29 +00:00
if (channel != null) {
2026-07-20 16:05:17 +00:00
lastMessageId = channel.lastMessageId;
}
return null != lastMessageId;
2026-07-29 08:29:29 +00:00
};
2026-07-20 16:05:17 +00:00
export const trackWaveCtaClicked = function trackWaveCtaClicked(channelId) {
const obj2 = { channel_id: channelId.channelId, source: channelId.source, dm_has_message_history: null };
const channel = ChannelStore.getChannel(channelId.channelId);
2026-07-29 08:29:29 +00:00
let lastMessageId;
if (channel != null) {
lastMessageId = channel.lastMessageId;
}
obj2.dm_has_message_history = null != lastMessageId;
AnalyticsUtilsDefault.track(AnalyticEvents.WAVE_CTA_CLICKED, obj2);
2026-07-20 16:05:17 +00:00
};