decord/source/modules/user_profile/hooks/useUserProfileVoiceActivity.tsx

55 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 11968
// Function ID: 92513
2026-07-20 16:05:17 +00:00
// Name: isUserProfileVoiceActivityForChannel
2026-07-25 08:10:48 +00:00
// Dependencies: [4218, 4147, 5972, 8997, 566, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-27 11:26:19 +00:00
// Module 11968 (isUserProfileVoiceActivityForChannel)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_4 from "_isNativeReflectConstruct";
const require = arg1;
2026-07-20 16:05:17 +00:00
function isUserProfileVoiceActivityForChannel(voiceStateForSession) {
let activity;
let voiceChannelId;
voiceStateForSession = voiceStateForSession.voiceStateForSession;
({ activity, voiceChannelId } = voiceStateForSession);
2026-07-25 08:10:48 +00:00
let tmp = importDefault(5972)(activity);
2026-07-20 16:05:17 +00:00
if (tmp) {
let channelId;
if (null != voiceStateForSession) {
channelId = voiceStateForSession.channelId;
}
tmp = channelId === voiceChannelId;
}
return tmp;
}
2026-07-23 10:11:24 +00:00
const result = require("isEmbeddedActivity").fileFinishedImporting("modules/user_profile/hooks/useUserProfileVoiceActivity.tsx");
2026-07-20 16:05:17 +00:00
export default function useUserProfileVoiceActivity(guildId) {
const userId = guildId.userId;
let id;
2026-07-25 08:10:48 +00:00
const tmp = id(8997)({ userId, guildId: guildId.guildId });
2026-07-23 10:11:24 +00:00
const voiceChannel = tmp.voiceChannel;
id = undefined;
2026-07-20 16:05:17 +00:00
if (null != voiceChannel) {
id = voiceChannel.id;
}
const obj = { voiceState: tmp.voiceState, voiceChannel };
2026-07-23 10:11:24 +00:00
const items = [_isNativeReflectConstruct, closure_4];
obj.voiceActivity = userId(566).useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
if (null != userId) {
if (null != id) {
2026-07-23 10:11:24 +00:00
const findActivityResult = outer1_3.findActivity(userId, (activity) => outer2_5({ activity, voiceChannelId: outer1_1, voiceStateForSession: outer2_4.getVoiceStateForSession(outer1_0, activity.session_id) }));
2026-07-20 16:05:17 +00:00
let tmp5;
if (null != findActivityResult) {
tmp5 = findActivityResult;
}
return tmp5;
}
}
});
return obj;
};
export { isUserProfileVoiceActivityForChannel };