1. the store works as a temporary store for connection data such as chats, messages & contacts
2. the store is primarily meant to illustrate the usage of the event emitter as a way to construct the state of the connection. This will likely be very inefficient to perform well at scale
3. the store is meant to be a quick way to have some visibility of data while testing
4. the store works for both legacy & MD connections
1. removes the "auth-state.update" event since it was bloated and fairly unnecessary
2. adds "creds.update" event that only sends the updated properties of the auth credentials
3. ensure the auth creds are not mutated anywhere, but only with the "creds.update" event
4. Separates the signal credentials from the auth credentials (kinda in progress)
5. in memory key store requires a save function to let one know when to save the keys
!BREAKING_CHANGE
* update example
* fix assertingPreKeys, uploadPreKeys to 30, generate QR timeout, sendRetryReceipt fix
* update example, change clear qr to event connection.update
* update example
* firstQR flag
* change checkConnection qr
* update example
* remove semis
* update example
The latest android version has messages with the last: true flag set on all messages, causing incorrect events being fired off. This update creates a timeout that fires off the initial-data-received 2500ms after the last messages received.
This may not be as accurate in production but will be better than the current version
- Switch to using got
- Use encryption/decryption streams for speed & lesser memory consumption
- Allow for stream based download & simultaneous upload of media
1. Update package version to 4.0.0
2. Retry query if the connection unexpectedly closes + make query iterative instead of recursive
3. Remove message-new & message-update deprecations
4. Deprecate loadProfilePicturesForChatsAutomatically
Waiting for chats & contacts is hella unreliable, so I've put them as events
1. receive chats via the `chats-received` event. If new chats are found, the flag for that is sent as well
2. receive contacts via the `contacts-received` event
3. When WA sends older messages, the `chats-update` or `chat-update` event is triggered
4. Baileys keeps track of all the changed conversations between connects
Connects almost always take less than 10 seconds!