|
|
|
|
@ -108,8 +108,7 @@ |
|
|
|
|
:size="36" |
|
|
|
|
:src=" |
|
|
|
|
msg.is_self |
|
|
|
|
? $store.state.user.netConfig.MINIO_ENDPOINT_HTTPS + |
|
|
|
|
$store.state.user.userInfo.avatar |
|
|
|
|
? $store.state.user.userInfo.avatar |
|
|
|
|
: currentChat.scene === ContactsScene.GROUP |
|
|
|
|
? $store.state.user.netConfig.MINIO_ENDPOINT_HTTPS + |
|
|
|
|
msg.avatar |
|
|
|
|
@ -663,18 +662,18 @@ export default { |
|
|
|
|
|
|
|
|
|
formatTextContent(content) { |
|
|
|
|
if (!content) return ""; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果 content 是对象,尝试获取其中的 content 字段 |
|
|
|
|
let text = content; |
|
|
|
|
if (typeof content === "object") { |
|
|
|
|
text = content.content || content.payload || JSON.stringify(content); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 确保 text 是字符串 |
|
|
|
|
if (typeof text !== "string") { |
|
|
|
|
text = String(text); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 转义HTML |
|
|
|
|
text = text |
|
|
|
|
.replace(/&/g, "&") |
|
|
|
|
|