19
This commit is contained in:
+4
-1
@@ -32,7 +32,6 @@ dayjs.updateLocale("zh-cn", {
|
||||
|
||||
export const formatMessageTime = (timestemp, keepSameYear = false) => {
|
||||
if (!timestemp) return "";
|
||||
|
||||
const isRecent = dayjs().diff(timestemp, "day") < 7;
|
||||
const keepYear = keepSameYear || !isThisYear(timestemp);
|
||||
|
||||
@@ -211,6 +210,10 @@ export const parseMessageByType = (pmsg) => {
|
||||
return `[RevokeMessage]`;
|
||||
case MessageType.MsgPinned:
|
||||
return `[MsgPinned]`;
|
||||
case 2001:
|
||||
const body = JSON.parse(pmsg.notificationElem.detail);
|
||||
body.data = JSON.parse(body.data);
|
||||
return parseMessageByType(body.data);
|
||||
default:
|
||||
return "[暂未支持的消息类型]";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user