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,33 @@
// Metro module 12811 (f12812).
import GuildChannelStore from "../GuildChannelStore";
import UserStore from "../UserStore";
import { MFALevels } from "../../Constants";
import Module589 from "../../_bundle/Module589";
import Dispatcher from "../../Dispatcher";
let mfaEnabled;
const handleUserStoreUpdates = function handleUserStoreUpdates() {
const currentUser = UserStore.getCurrentUser();
if (currentUser != null && currentUser.mfaEnabled !== mfaEnabled) {
mfaEnabled = currentUser.mfaEnabled;
return void 0;
}
return false;
};
mfaEnabled = null;
class GuildMFAWarningStore extends Module589.Store {
static displayName = "GuildMFAWarningStore";
initialize() {
this.waitFor(UserStore, GuildChannelStore);
this.syncWith([UserStore, GuildChannelStore], handleUserStoreUpdates);
}
isVisible(a0) {
return a0 != null && a0.mfaLevel === MFALevels.ELEVATED && mfaEnabled === false && GuildChannelStore.hasElevatedPermissions(a0.id);
}
}
const guildMFAWarningStore = new GuildMFAWarningStore(Dispatcher, {
CONNECTION_OPEN: handleUserStoreUpdates,
GUILD_UPDATE: function handleGuildPermissionsUpdate() {
return true;
}
});
export default guildMFAWarningStore;