decord/source/modules/rtc/hooks/useIsSecureFramesUIEnabled.tsx

48 lines
1.5 KiB
TypeScript
Raw Normal View History

// Module ID: 9099
// Function ID: 9100
2026-07-20 16:05:17 +00:00
// Name: useIsSecureFramesUIEnabled
// Dependencies: [1386, 4557, 9081, 586, 2]
2026-07-20 16:05:17 +00:00
// Exports: useIsSecureFramesUIEnabled
// Module 9099 (useIsSecureFramesUIEnabled)
2026-09-02 09:53:35 +00:00
import closure_2 from "ensureGuildLoaded" /* 1386 */;
import closure_3 from "createRTCConnection" /* 4557 */;
import { END_TO_END_ENCRYPTION_DISABLED as closure_4 } from "SECURE_FRAMES_LINKING_BOTTOM_SHEET_KEY" /* 9081 */;
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/rtc/hooks/useIsSecureFramesUIEnabled.tsx");
2026-07-20 16:05:17 +00:00
export const useIsSecureFramesUIEnabled = function useIsSecureFramesUIEnabled(channelId) {
channelId = channelId.channelId;
2026-08-24 06:08:38 +00:00
let items = [closure_3, closure_2];
2026-07-29 08:29:29 +00:00
const items1 = [channelId];
2026-09-02 09:53:35 +00:00
return channelId(586).useStateFromStores(items, () => {
2026-08-24 06:08:38 +00:00
const items = [closure_1_3, closure_1_2];
2026-07-20 16:05:17 +00:00
[obj, obj2] = items;
let flag = false;
if (null != channelId) {
flag = false;
if (obj.getChannelId() === tmp) {
const channel = obj2.getChannel(tmp);
flag = false;
if (null != channel) {
flag = false;
if (!channel.isGuildStageVoice()) {
const secureFramesState = obj.getSecureFramesState();
let version;
2026-07-29 08:29:29 +00:00
if (secureFramesState != null) {
2026-07-20 16:05:17 +00:00
version = secureFramesState.version;
}
2026-07-29 08:29:29 +00:00
let tmp4 = null != version;
if (tmp4) {
2026-08-24 06:08:38 +00:00
tmp4 = version !== closure_1_4;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
flag = tmp4;
2026-07-20 16:05:17 +00:00
}
}
}
}
return flag;
}, items1);
};