Based on the conversation in https://discord.com/channels/831836269558235136/993229186951028796/1039310518348951653, I think it would be a good idea to add a snippet to the readme that illustrates use of streamAllMessages(). I'm thinking the easiest way would be to update the instructions at https://xmtp.org/docs/client-sdk/javascript/tutorials/quickstart#listen-for-new-messages-in-a-conversation, adding at the bottom:
To listen for any incoming messages from all conversations, use streamAllMessages():
for await (const message of await xmtp.conversations.streamAllMessages()) {
if (message.senderAddress === xmtp.address) {
// This message was sent from me
continue
}
console.log(`New message from ${message.senderAddress}: ${message.content}`)
}
I'd be happy to take this on if you want to assign it to me.
Based on the conversation in
https://discord.com/channels/831836269558235136/993229186951028796/1039310518348951653
, I think it would be a good idea to add a snippet to the readme that illustrates use ofstreamAllMessages()
. I'm thinking the easiest way would be to update the instructions athttps://xmtp.org/docs/client-sdk/javascript/tutorials/quickstart#listen-for-new-messages-in-a-conversation
, adding at the bottom:I'd be happy to take this on if you want to assign it to me.