|
@@ -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,
|
|
|
});
|
|
|
}
|