From ad8c63834930ec7625ce29dce7be8b46b6572485 Mon Sep 17 00:00:00 2001 From: Oscar Guindzberg Date: Sat, 27 Jul 2024 10:12:06 -0300 Subject: [PATCH] Fix: Readme use upsert events (#908) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d2706f3..4635a64 100644 --- a/README.md +++ b/README.md @@ -324,13 +324,13 @@ const sock = makeWASocket({ }) // the store can listen from a new socket once the current socket outlives its lifetime store.bind(sock.ev) -sock.ev.on('chats.set', () => { +sock.ev.on('chats.upsert', () => { // can use "store.chats" however you want, even after the socket dies out // "chats" => a KeyedDB instance console.log('got chats', store.chats.all()) }) -sock.ev.on('contacts.set', () => { +sock.ev.on('contacts.upsert', () => { console.log('got contacts', Object.values(store.contacts)) })