wkw 1 ヶ月 前
コミット
43a085a3f3
1 ファイル変更8 行追加1 行削除
  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
+          }
+        }
       }
     },