📨 Messages Events
yseries:server:messages:sent
Triggered when a new message is successfully sent and saved to the database. This event fires after the message has been inserted into the database and notifications have been sent to recipients.
Event Data:
lua
Usage Example:
lua
Notes:
- This event fires for all messages, including group messages
- The
senderImeican benilfor messages sent from non-existent phone numbers (e.g. system messages) - The
attachmentsfield is a JSON string that needs to be decoded if you want to access the attachment data - The
participantsfield can be either a string (single recipient) or a table/array (multiple recipients for group messages) - The
targetSourceis only set if at least one recipient is online; otherwise it'snil