Skip to content

Commit

Permalink
fix: Fixed attribute chat on MessageModel (#1077)
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Apr 28, 2023
1 parent 83d1ef9 commit 38ba3af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chat/events/registerNewMessageEvent.ts
Expand Up @@ -44,7 +44,7 @@ async function addAttributesMsg(msg: any): Promise<MsgModel> {
if (typeof msg.chat === 'undefined') {
msg.chat = ChatStore.get(msg.from as Wid);
Object.defineProperty(msg, 'chat', {
value: msg.isGroupMsg || msg?.chat?.isGroup,
value: msg?.chat,
writable: false,
});
}
Expand Down

0 comments on commit 38ba3af

Please sign in to comment.