fix: temp chat perm

This commit is contained in:
Timothy Jaeryang Baek committed 2025-12-06 08:02:12 -05:00
1 parent 2a8a2f1ba3
commit 508fde70ff
2 files changed
+26 -17

No files matched your search

+9 -2
View File
@@ -902,8 +902,15 @@
const initNewChat = async () => {
console.log('initNewChat');
if ($user?.role !== 'admin' && $user?.permissions?.chat?.temporary_enforced) {
await temporaryChatEnabled.set(true);
if ($user?.role !== 'admin') {
if ($user?.permissions?.chat?.temporary_enforced) {
await temporaryChatEnabled.set(true);
}
if (!$user?.permissions?.chat?.temporary) {
await temporaryChatEnabled.set(false);
return;
}
}
if ($settings?.temporaryChatByDefault ?? false) {