* get chat default messages fix#1014
* fixing format
* Update src/structures/Chat.js
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
* add search and status tests
* reset to previous status in test
* move version to its own test
* add tests for Chat model
* keep hooks at the top
* run tests recursively in default script
* muteChat fixed
* Update src/Client.js
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
* Update src/Client.js
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
* date fix
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
* Get all labels
* Get chats by label
* Get labels assigned to chats
Co-authored-by: Pedro S. Lopez <pslamoros@hotmail.com>
Co-authored-by: Pedro Lopez <pedroslopez@me.com>
Moving this to a serializer function like done with a couple other models guarantees getting messages with pending acks won't fail elsewhere. It also sets it up so the we can add/remove properties on the Message model as needed in the future.
related: 51a1028588
* chore: add ClientOptions and ClientInfo in JSDoc
* chore: add MessageSendOptions type
* chore: add ClientSession type in JSDoc
* chore: remove @todo from createGroup (was already solved)
Co-authored-by: Pedro Lopez <pedroslopez@me.com>
After this commit, chats will be automatically marked as seen when a message is sent to it. If this is not the intended behavior, `sendSeen: false` can be set as part of the options object.
You can also manually mark a conversation as seen by calling the sendSeen() function on the Chat.
Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
This will automatically fetch messages until it reaches the specified limit or there are no more messages. In the future, this should be extended to fetch messages before, after or around a specific message/date by adding props to the searchOptions object.
close#51