Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Streaming message feature #2

Closed
HassenMabrouki opened this issue Nov 16, 2022 · 1 comment
Closed

Streaming message feature #2

HassenMabrouki opened this issue Nov 16, 2022 · 1 comment
Assignees

Comments

@HassenMabrouki
Copy link

Context

Attempting to use xmtp-js in React Native, I successfully integrate the SDK, I can send messages, and also get the messages list works fine.

Problem

Listen for new messages in a conversation it's not working

for await (const message of await conversation.streamMessages()) {
  if (message.senderAddress === xmtp.address) {
    // This message was sent from me
    continue
  }
  console.log(`New message from ${message.senderAddress}: ${message.content}`)
}

Screenshot

Screen Shot 2022-11-16 at 12 11 51 PM
Screen Shot 2022-11-16 at 12 14 23 PM

Expectation

As I followed the documentation, the expected result whenever I send a message from user A to user B, the message should be displayed for user B, but it is not the case for me.

I'll be so thankful If give us any hints to make this work. :)

@elisealix22 elisealix22 self-assigned this Dec 2, 2022
@elisealix22
Copy link
Contributor

Duplicate of xmtp/xmtp-js#223

@elisealix22 elisealix22 marked this as a duplicate of xmtp/xmtp-js#223 Dec 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants