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

37 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 11918
// Function ID: 11919
// Name: trackWaveCtaClicked
2026-10-09 10:00:15 +00:00
// Dependencies: [2064, 1085, 1265, 2]
2026-07-29 08:29:29 +00:00
// Exports: getDmHasMessageHistory, trackWaveCtaClicked
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 11918 (trackWaveCtaClicked)
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-09 10:00:15 +00:00
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1265 */;
import ChannelStore from "ChannelStore" /* 2064 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
const AnalyticEvents = Constants.AnalyticEvents;
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) {
2026-07-29 08:29:29 +00:00
let lastMessageId;
2026-10-03 08:58:59 +00:00
const obj = { channel_id: channelId.channelId, source: channelId.source, dm_has_message_history: null != lastMessageId };
const track = AnalyticsUtilsDefault.track;
const WAVE_CTA_CLICKED = AnalyticEvents.WAVE_CTA_CLICKED;
AnalyticsUtilsDefault;
const channel = ChannelStore.getChannel(channelId.channelId);
lastMessageId = undefined;
2026-07-29 08:29:29 +00:00
if (channel != null) {
lastMessageId = channel.lastMessageId;
}
2026-10-03 08:58:59 +00:00
track(WAVE_CTA_CLICKED, obj);
2026-07-20 16:05:17 +00:00
};