decord/alpha/source/modules/analytics/updateDynamicSuperProperties.tsx

46 lines
1.5 KiB
TypeScript
Raw Permalink Normal View History

2026-10-13 12:43:34 +00:00
// Module ID: 18016
// Function ID: 18017
2026-07-20 16:05:17 +00:00
// Name: updateDynamicSuperProperties
2026-10-12 06:59:38 +00:00
// Dependencies: [7184, 1273, 6071, 2]
2026-07-20 16:05:17 +00:00
// Exports: updateDynamicSuperProperties
2026-10-13 12:43:34 +00:00
// Module 18016 (updateDynamicSuperProperties)
2026-10-09 10:00:15 +00:00
import discord_common_AnalyticsUtils from "discord_common/AnalyticsUtils" /* 1273 */;
2026-10-10 08:08:14 +00:00
import DiscordAppStateDefault from "DiscordAppState" /* 6071 */;
2026-10-12 06:59:38 +00:00
import SessionHeartbeatScheduler from "SessionHeartbeatScheduler" /* 7184 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
let result = size.fileFinishedImporting("modules/analytics/updateDynamicSuperProperties.tsx");
2026-07-20 16:05:17 +00:00
export const updateDynamicSuperProperties = function updateDynamicSuperProperties() {
2026-10-03 08:58:59 +00:00
const obj = SessionHeartbeatScheduler;
const activeSessionUnsafe = obj.getActiveSessionUnsafe();
const obj2 = discord_common_AnalyticsUtils;
const superProperties = obj2.getSuperProperties();
2026-07-20 16:05:17 +00:00
let uuid;
2026-07-29 08:29:29 +00:00
if (activeSessionUnsafe != null) {
2026-07-20 16:05:17 +00:00
uuid = activeSessionUnsafe.uuid;
}
let prop;
2026-07-29 08:29:29 +00:00
if (superProperties != null) {
2026-07-20 16:05:17 +00:00
prop = superProperties.client_heartbeat_session_id;
}
const obj3 = {};
2026-07-20 16:05:17 +00:00
if (uuid !== prop) {
obj3.client_heartbeat_session_id = uuid;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
const obj4 = DiscordAppStateDefault;
const state = obj4.getState();
2026-07-20 16:05:17 +00:00
let client_app_state;
2026-07-29 08:29:29 +00:00
if (superProperties != null) {
2026-07-20 16:05:17 +00:00
client_app_state = superProperties.client_app_state;
}
if (state !== client_app_state) {
obj3.client_app_state = state;
2026-07-20 16:05:17 +00:00
}
if (Object.keys(obj3).length > 0) {
const tmpResult = discord_common_AnalyticsUtils;
2026-10-03 08:58:59 +00:00
const result = tmpResult.extendSuperProperties(obj3);
2026-07-20 16:05:17 +00:00
}
};