decord/beta/source/modules/video_calls/getParticipantTitle.tsx
2026-10-02 13:37:24 +00:00

46 lines
1.4 KiB
TypeScript

// Module ID: 9504
// Function ID: 9505
// Name: getParticipantTitle
// Dependencies: [4858, 9505, 4989, 1127, 2]
// Exports: default
// Module 9504 (getParticipantTitle)
import CallConstants from "CallConstants" /* 4858 */;
import NicknameUtilsDefault from "NicknameUtils" /* 4989 */;
import useIsGuestOrLurker from "useIsGuestOrLurker" /* 9505 */;
import size from "module_2" /* 2 */;
const ParticipantTypes = CallConstants.ParticipantTypes;
let result = size.fileFinishedImporting("modules/video_calls/getParticipantTitle.tsx");
export default function getParticipantTitle(guild_id, type, name) {
if (type.type === ParticipantTypes.ACTIVITY) {
name = undefined;
if (name != null) {
name = name.name;
}
if (name == null) {
name = null;
}
return name;
} else {
const user = type.user;
let id;
const isGuestOrLurkerInGuild = useIsGuestOrLurker.isGuestOrLurkerInGuild;
guild_id = guild_id.guild_id;
useIsGuestOrLurker;
if (user != null) {
id = user.id;
}
const result = isGuestOrLurkerInGuild(guild_id, id);
let str = "";
const obj = NicknameUtilsDefault;
const name1 = obj.getName(guild_id.getGuildId(), guild_id.id, type.user);
if (result) {
const intl = tmp10(1127).intl;
const _HermesInternal = HermesInternal;
str = " " + intl.string(tmp10(1127).t["pFO/Ph"]);
}
return name1 + str;
}
};