Receiving Group Messages
Group messages arrive through a dedicated callback, separate from 1:1 messages:
client.onGroupMessage((msg) => {
console.log(`[${msg.groupId}] ${msg.senderId}: ${msg.plaintext}`);
});
// Remove listener
client.offGroupMessage(handler);Message fields
groupId, the group the message belongs tomessageId, unique message identifiersenderId, the user who sent the messageplaintext/text, decrypted message contentmetadata, optional JSON metadatatimestamp, server-assigned timestamp