From 6fb6cbfce89749376f3f61bb7c50e47ca9f037d9 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Thu, 2 Jan 2025 15:50:31 +0000 Subject: [PATCH] Fixed a bug that caused new roles and channels not to sort. --- commissar-user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commissar-user.js b/commissar-user.js index f0b5db8..5f2e3b7 100644 --- a/commissar-user.js +++ b/commissar-user.js @@ -203,8 +203,8 @@ class CommissarUser { if (friend_role_id === this.friend_role_id) { return; } - fc.friendRoleCache[this.friend_role_id] = this.commissar_id; this.friend_role_id = friend_role_id; + fc.friendRoleCache[friend_role_id] = this.commissar_id; await this.updateFieldInDatabase('friend_role_id', this.friend_role_id); } @@ -228,8 +228,8 @@ class CommissarUser { if (friend_voice_room_id === this.friend_voice_room_id) { return; } - fc.friendRoomCache[this.friend_voice_room_id] = this.commissar_id; this.friend_voice_room_id = friend_voice_room_id; + fc.friendRoomCache[friend_voice_room_id] = this.commissar_id; await this.updateFieldInDatabase('friend_voice_room_id', this.friend_voice_room_id); }