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

37 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 11964
// Function ID: 11965
// Name: trackWaveCtaClicked
2026-10-12 16:32:48 +00:00
// Dependencies: [2065, 1085, 1265, 2]
// Exports: getDmHasMessageHistory, trackWaveCtaClicked
2026-10-12 16:32:48 +00:00
// Module 11964 (trackWaveCtaClicked)
2026-10-07 22:43:51 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-12 16:32:48 +00:00
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1265 */;
import ChannelStore from "ChannelStore" /* 2065 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
2026-10-01 14:13:23 +00:00
const AnalyticEvents = Constants.AnalyticEvents;
const result = size.fileFinishedImporting("modules/channel/trackWaveCtaClicked.tsx");
export const getDmHasMessageHistory = function getDmHasMessageHistory(arg0) {
const channel = ChannelStore.getChannel(arg0);
let lastMessageId;
if (channel != null) {
lastMessageId = channel.lastMessageId;
}
return null != lastMessageId;
};
export const trackWaveCtaClicked = function trackWaveCtaClicked(channelId) {
let lastMessageId;
2026-10-01 14:13:23 +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;
if (channel != null) {
lastMessageId = channel.lastMessageId;
}
2026-10-01 14:13:23 +00:00
track(WAVE_CTA_CLICKED, obj);
};