decord/beta/source/modules/video_calls/getParticipantTitle.tsx
2026-10-07 22:43:51 +00:00

46 lines
1.4 KiB
TypeScript

// Module ID: 9732
// Function ID: 9733
// Name: getParticipantTitle
// Dependencies: [4911, 9733, 5042, 1126, 2]
// Exports: default
// Module 9732 (getParticipantTitle)
import CallConstants from "CallConstants" /* 4911 */;
import NicknameUtilsDefault from "NicknameUtils" /* 5042 */;
import useIsGuestOrLurker from "useIsGuestOrLurker" /* 9733 */;
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(1126).intl;
const _HermesInternal = HermesInternal;
str = " " + intl.string(tmp10(1126).t["pFO/Ph"]);
}
return name1 + str;
}
};