decord/alpha/source/modules/public_guilds/PublicGuildsUtils.tsx

44 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 8045
// Function ID: 8046
// Name: PublicGuildsUtils
2026-10-09 10:00:15 +00:00
// Dependencies: [8046, 1085, 8047, 8048, 1265, 5106, 2]
2026-07-20 16:05:17 +00:00
// Exports: getPublicSystemMessageAvatar, isPublicSystemMessage, trackEnableCommunityFlow
2026-10-09 10:00:15 +00:00
// Module 8045 (PublicGuildsUtils)
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 AppAnalyticsUtils from "AppAnalyticsUtils" /* 5106 */;
import isCrosspostDefault from "isCrosspost" /* 8047 */;
import PublicGuildsConstants from "PublicGuildsConstants" /* 8046 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
2026-10-03 08:58:59 +00:00
let c3;
let closure_4;
let hasOwnProperty;
({ PUBLIC_GUILD_ANNOUNCEMENTS_GUILD_ID: c3, PUBLIC_GUILD_UPDATES_WEBHOOK_USER_ID: closure_4, ENABLE_COMMUNITY_FLOW_MODAL_KEY: hasOwnProperty } = PublicGuildsConstants);
const AnalyticEvents = Constants.AnalyticEvents;
const result = size.fileFinishedImporting("modules/public_guilds/PublicGuildsUtils.tsx");
2026-07-20 16:05:17 +00:00
export const isPublicSystemMessage = function isPublicSystemMessage(message) {
2026-10-03 08:58:59 +00:00
let tmp = isCrosspostDefault(message) && message.messageReference.guild_id === _false;
2026-07-20 16:05:17 +00:00
if (!tmp) {
2026-10-03 08:58:59 +00:00
tmp = null != message.author && message.author.id === React3;
const tmp4 = null != message.author && message.author.id === React3;
2026-07-20 16:05:17 +00:00
}
return tmp;
};
export const getPublicSystemMessageAvatar = function getPublicSystemMessageAvatar() {
2026-10-03 08:58:59 +00:00
return require("AssetRegistry");
2026-07-20 16:05:17 +00:00
};
export const trackEnableCommunityFlow = function trackEnableCommunityFlow(fromStep) {
2026-10-03 08:58:59 +00:00
const track = AnalyticsUtilsDefault.track;
const USER_FLOW_TRANSITION = AnalyticEvents.USER_FLOW_TRANSITION;
const obj = { flow_type: hasOwnProperty, from_step: fromStep.fromStep, to_step: fromStep.toStep };
AnalyticsUtilsDefault;
const obj2 = AppAnalyticsUtils;
const merged = Object.assign(obj2.collectGuildAnalyticsMetadata(fromStep.guildId));
track(USER_FLOW_TRANSITION, obj);
2026-07-20 16:05:17 +00:00
};