Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Streaming all group messages causes no streamGroup callbacks #415

Closed
alexrisch opened this issue Jun 12, 2024 · 0 comments · Fixed by #417
Closed

Bug: Streaming all group messages causes no streamGroup callbacks #415

alexrisch opened this issue Jun 12, 2024 · 0 comments · Fixed by #417
Assignees
Labels
bug Something isn't working

Comments

@alexrisch
Copy link
Contributor

alexrisch commented Jun 12, 2024

Describe the bug

Streaming all group messages causes no streamGroup callbacks

 const [alix, bo] = await createClients(2)
  console.log('created clients')

  let groupCallbacks = 0
  let messageCallbacks = 0
  await bo.conversations.streamGroups(async () => {
    console.log('message received')
    groupCallbacks++
  })

  await bo.conversations.streamAllMessages(async () => {
    console.log('message received')
    messageCallbacks++
  }, true)

  const group = await alix.conversations.newGroup([bo.address])
  await group.send('hello')

  await delayToPropogate()
  await new Promise((resolve) => setTimeout(resolve, 10000))
  assert(groupCallbacks === 1, 'group stream should have received 1 group') // <--- Fails here
  assert(
    messageCallbacks === 1,
    'message stream should have received 1 message'
  )
  return true

Expected behavior

No response

Steps to reproduce the bug

No response

@alexrisch alexrisch added the bug Something isn't working label Jun 12, 2024
@nplasterer nplasterer self-assigned this Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants