fix: temp chat perm
This commit is contained in:
1 parent
2a8a2f1ba3
commit
508fde70ff
2 files changed
+26
-17
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user