decord/source/modules/user_profile/utils/trackUserAvatarUpdated.tsx
github-actions a36fe4ec9c chore: update source for alpha 347.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-14 20:04:03 +00:00

39 lines
1.6 KiB
TypeScript

// Module ID: 7091
// Function ID: 7092
// Name: trackUserAvatarUpdated
// Dependencies: [1074, 7092, 1240, 1396, 2]
// Exports: trackUserAvatarUpdated
// Module 7091 (trackUserAvatarUpdated)
import Constants from "Constants" /* 1074 */;
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1240 */;
import AvatarUtils from "AvatarUtils" /* 1396 */;
import ProfilePendingImageTypes from "ProfilePendingImageTypes" /* 7092 */;
import size from "module_2" /* 2 */;
const AnalyticEvents = Constants.AnalyticEvents;
const result = size.fileFinishedImporting("modules/user_profile/utils/trackUserAvatarUpdated.tsx");
export const trackUserAvatarUpdated = function trackUserAvatarUpdated(isGuildProfile) {
let flag = isGuildProfile.isGuildProfile;
({ avatarHash, avatarId } = isGuildProfile);
if (flag === undefined) {
flag = false;
}
let NEW_ASSET = isGuildProfile.avatarAssetOrigin;
if (NEW_ASSET === undefined) {
NEW_ASSET = ProfilePendingImageTypes.AssetOriginTypes.NEW_ASSET;
}
const obj2 = { animated: null, is_guild_profile: null, recent_avatar_id: null, is_edited_recent_avatar: null };
const obj = AnalyticsUtilsDefault;
obj2.animated = AvatarUtils.isAnimatedIconHash(avatarHash);
obj2.is_guild_profile = flag;
let NumberResult;
if (NEW_ASSET === ProfilePendingImageTypes.AssetOriginTypes.ARCHIVED_ASSET) {
const _Number = Number;
NumberResult = Number(avatarId);
}
obj2.recent_avatar_id = NumberResult;
obj2.is_edited_recent_avatar = NEW_ASSET === ProfilePendingImageTypes.AssetOriginTypes.EDITED_ARCHIVED_ASSET;
obj.track(AnalyticEvents.USER_AVATAR_UPDATED, obj2);
};