diff --git a/ling_chair_http/chat-message.css b/ling_chair_http/chat-message.css index dd59cab..33b435b 100644 --- a/ling_chair_http/chat-message.css +++ b/ling_chair_http/chat-message.css @@ -87,4 +87,5 @@ .message-image { max-width: 40%; max-height: 40%; + border-radius: 15px; } diff --git a/ling_chair_http/handler.js b/ling_chair_http/handler.js index adc197c..d283c49 100644 --- a/ling_chair_http/handler.js +++ b/ling_chair_http/handler.js @@ -268,7 +268,7 @@ class ChatMsgAdapter { static target static minMsgId static time - static bbn + static minutesCache static resizeDick /** * 切换到某一个聊天对象 @@ -395,60 +395,62 @@ class ChatMsgAdapter { * @param {String || int} 消息id * @returns {jQuery} 消息元素 */ - static async addMsg(name, m, t, re, msgid) { + static async addMsg(name, preMsg, time, addToTop, msgid) { let nick = await NickCache.getNick(name) // re.data == null ? name : re.data.nick let msg try { - msg = await marked.parse(m) - } catch(e) { - console.log("解析消息失败: " + e) - msg = escapeHTML(m) + msg = await marked.parse(preMsg) + } catch(error) { + console.log("解析消息失败: " + error) + msg = escapeHTML(preMsg) } let temp if (name === localStorage.userName) temp = `