From a08cd001075196f97db964ebab1caf3a00166255 Mon Sep 17 00:00:00 2001 From: Meir Blachman Date: Sun, 17 Apr 2022 13:46:37 +0300 Subject: [PATCH] docs: fix typo in readme (#1483) * docs: fix typo in readme makeSocket -> makeWASocket * rename sock -> conn --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c07d30..a155fdf 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ const { state, saveState } = useSingleFileAuthState('./auth_info_multi.json') // so if valid credentials are available -- it'll connect without QR const conn = makeWASocket({ auth: state }) // this will be called as soon as the credentials are updated -sock.ev.on ('creds.update', saveState) +conn.ev.on ('creds.update', saveState) ``` **Note**: When a message is received/sent, due to signal sessions needing updating, the auth keys (`authState.keys`) will update. Whenever that happens, you must save the updated keys. Not doing so will prevent your messages from reaching the recipient & other unexpected consequences. The `useSingleFileAuthState` function automatically takes care of that, but for any other serious implementation -- you will need to be very careful with the key state management.