Fix in-memory-store contacts (#1420)

fix issue where fromJSON loads contacts from the wrong variable
This commit is contained in:
Cesar Cejudo
2022-03-27 09:06:28 -06:00
committed by GitHub
parent 6275b85eae
commit 54a448b2a8

View File

@@ -239,7 +239,7 @@ export default (
const fromJSON = (json: { chats: Chat[], contacts: { [id: string]: Contact }, messages: { [id: string]: WAMessage[] } }) => {
chats.upsert(...json.chats)
contactsUpsert(Object.values(contacts))
contactsUpsert(Object.values(json.contacts))
for(const jid in json.messages) {
const list = assertMessageList(jid)
for(const msg of json.messages[jid]) {