decord/source/modules/analytics_sessions/SkippedClientHeartbeatUtil.tsx

27 lines
836 B
TypeScript
Raw Normal View History

// Module ID: 7542
// Function ID: 7543
// Name: SkippedClientHeartbeatUtil
// Dependencies: [1371, 7543, 2]
2026-08-14 17:33:39 +00:00
// Exports: shouldLogClientHeartbeatSkipped
// Module 7542 (SkippedClientHeartbeatUtil)
import sampleWithUserId from "sampleWithUserId" /* 7543 */;
import UserStore from "UserStore" /* 1371 */;
2026-08-14 17:33:39 +00:00
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/analytics_sessions/SkippedClientHeartbeatUtil.tsx");
2026-08-14 17:33:39 +00:00
export const shouldLogClientHeartbeatSkipped = function shouldLogClientHeartbeatSkipped() {
const currentUser = UserStore.getCurrentUser();
2026-08-14 17:33:39 +00:00
let tmp = null != currentUser;
if (tmp) {
let isStaffResult = currentUser.isStaff();
if (!isStaffResult) {
2026-08-24 06:08:38 +00:00
isStaffResult = sampleWithUserId.sampleWithUserId(currentUser.id, 0.02);
2026-08-14 17:33:39 +00:00
}
tmp = isStaffResult;
}
return tmp;
};