This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,26 @@
// Metro module 15863 (f15864).
import AuthenticationStore from "../../../../stores/AuthenticationStore";
import RTCConnectionStore from "../../../../stores/RTCConnectionStore";
import VoiceStateStore from "../../../../stores/VoiceStateStore";
import { RTCConnectionStates } from "../../../../Constants";
import { useStateFromStores } from "../../../../_bundle/Module589";
export default function useIsConnectedToVoiceChannel(c22529_0) {
return useStateFromStores([RTCConnectionStore, VoiceStateStore, AuthenticationStore], () => {
const channelId = RTCConnectionStore.getChannelId();
let r6 = c22529_0;
if (r6 == null) {
r6 = channelId;
}
if (r6 !== channelId) {
return false;
}
if (VoiceStateStore.isInChannel(r6, AuthenticationStore.getId())) {
return true;
}
const state = RTCConnectionStore.getState();
if (RTCConnectionStates.DISCONNECTED !== state && RTCConnectionStates.NO_ROUTE !== state) {
return true;
}
return false;
});
};