liming 1 week ago
parent
commit
54c5857c42
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/stores/modules/webSocketStore.js

+ 5 - 5
src/stores/modules/webSocketStore.js

@@ -262,14 +262,14 @@ export const useWebSocketStore = defineStore("webSocketStore", {
         }
 
         // 音频消息
-        if (message.messageType === MSG_TYPE.AUDIO) {
-          const audioBlob = new Blob([message.file], {
-            type: `audio/${message.fileSuffix}`,
+        if (data.messageType === MSG_TYPE.AUDIO) {
+          const audioBlob = new Blob([data.file], {
+            type: `audio/${data.fileSuffix}`,
           });
           const audioUrl = URL.createObjectURL(audioBlob);
           this.messages.push({
-            ...message,
-            toUsername: message.to,
+            ...data,
+            toUsername: data.to,
             url: audioUrl,
           });
         }