Files
discord-decomp/sources/modules/rtc/hooks/useIsSecureFramesKeyInconsistent.tsx
T
2026-07-27 16:20:00 +03:00

61 lines
3.3 KiB
TypeScript

/* Metro module 9285; source: modules/rtc/hooks/useIsSecureFramesKeyInconsistent.tsx; dependencies: [31, 4294, 4395, 566, 9275, 2] */
function _fun72634(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9471:6, offset: 0x01d4c457, size: 166 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function({userId}) {
return require(dependencyMap[3]).useStateFromStores([RTCConnectionStore, StreamRTCConnectionStore], _fun72636);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const streamRTCConnectionStore = importDefault(4395) /* metro dependency 4395: StreamRTCConnectionStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rtc/hooks/useIsSecureFramesKeyInconsistent.tsx');
exports.useIsSecureFramesKeyInconsistent = closure;
exports.useAlertIfSecureFramesKeyInconsistent = useAlertIfSecureFramesKeyInconsistent;
}
function useIsSecureFramesKeyInconsistent({userId}) { // fn#72635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9471:126, offset: 0x01d4c4fd, size: 79 bytes, params: 2, frame: 15
return (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore,
StreamRTCConnectionStore], function() {
return require(dependencyMap[4]).getIsSecureFramesKeyInconsistent(userId, [RTCConnectionStore,
StreamRTCConnectionStore]);
});
}
function useAlertIfSecureFramesKeyInconsistent({channelId, userId, nickname, onAlertOpen}) { // fn#72637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9471:473, offset: 0x01d4c58e, size: 131 bytes, params: 2, frame: 19
const env0_2 = nickname;
const value2 = useIsSecureFramesKeyInconsistent({userId: userId});
const binding = env0_2;
const env0_5 = binding.useRef(null);
binding.useEffect(_fun72638, [channelId, value2, nickname, onAlertOpen, userId]);
}
function _fun72638() { // fn#72638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9471:650, offset: 0x01d4c611, size: 122 bytes, params: 1, frame: 16
var clearTimeout;
var binding;
if (env0_4) {
if (env0_5.current == null) {
env0_5.current = global.setTimeout(function() {
onAlertOpen();
require(dependencyMap[4]).showSecureFramesKeyInconsistentAlert({userId: userId, channelId: channelId,
nickname: nickname});
}, 1000);
} else {
clearTimeout = global.clearTimeout;
binding = env0_5;
clearTimeout(binding.current);
binding.current = null;
}
} else {
clearTimeout = global.clearTimeout;
binding = env0_5;
clearTimeout(binding.current);
binding.current = null;
}
const current = env0_5.current;
return function() {
global.clearTimeout(current);
};
}