refactor: update chat modifications to be uniform across MD + legacy

This commit is contained in:
Adhiraj Singh
2021-12-21 10:53:39 +05:30
parent 677f50baaa
commit c87d8b8129
5 changed files with 32 additions and 22 deletions

View File

@@ -541,8 +541,8 @@ export const makeChatsSocket = (config: SocketConfig) => {
* lastMessages must be sorted in reverse chronologically
* requires the last messages till the last message received; required for archive & unread
*/
const chatModify = (mod: ChatModification, jid: string, lastMessages: Pick<proto.IWebMessageInfo, 'key' | 'messageTimestamp'>[]) => {
const patch = chatModificationToAppPatch(mod, jid, lastMessages)
const chatModify = (mod: ChatModification, jid: string) => {
const patch = chatModificationToAppPatch(mod, jid)
return appPatch(patch)
}