wkw 1 month ago
parent
commit
43a085a3f3
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/stores/modules/webSocketStore.js

+ 8 - 1
src/stores/modules/webSocketStore.js

@@ -790,7 +790,14 @@ export const useWebSocketStore = defineStore("webSocketStore", {
           } : (msg.uuid == val.toUuid ? {
             toUsername: msg.name
           }:{})
-        })
+        });
+        // 个人群昵称
+        if (msg.name) {
+          this.updateSessionNewMessage({ name: msg.name }, msg.uuid);
+          if (this.toUserInfo.uuid === msg.uuid) {
+            this.toUserInfo.nickname = msg.name
+          }
+        }
       }
     },