diff --git a/standard/model/external.ts b/standard/model/external.ts index d16b906..c5f29f2 100644 --- a/standard/model/external.ts +++ b/standard/model/external.ts @@ -20,6 +20,9 @@ export async function onMessageReceived( ext.extend_message_body.messageType == 5) { originMessage.ext.shouldRead = true; delegate.im.conversation.updateMessageExt(originMessage.messageId, originMessage.ext); + } else { + originMessage.ext.shouldRead = false; + delegate.im.conversation.updateMessageExt(originMessage.messageId, originMessage.ext); } const message = Action.Parse.get([], originMessage, originMessage); diff --git a/standard/model/message.ts b/standard/model/message.ts index c98e8fe..99dd7c2 100644 --- a/standard/model/message.ts +++ b/standard/model/message.ts @@ -25,7 +25,7 @@ export async function sendMessage( isSystem: boolean = false, autoTimestamp: boolean = true, ): Promise { - ext = {...ext, innerId: message.innerId}; + ext = {...ext, innerId: message.innerId, shouldRead: true}; const sendEventName = [Event.Base, Event.SendMessage, imId]; if (!delegate.model.Conversation.getOne(imId, false)) { await delegate.model.Conversation.loadItem(imId, chatType);