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

Subscription returned a nosub error map[id:3 msg:nosub] #44

Open
mosskin-woast opened this issue Jun 30, 2021 · 0 comments
Open

Subscription returned a nosub error map[id:3 msg:nosub] #44

mosskin-woast opened this issue Jun 30, 2021 · 0 comments

Comments

@mosskin-woast
Copy link

mosskin-woast commented Jun 30, 2021

Using the Client.Sub method to subscribe to stream-room-messages for a new room returns this error: Subscription returned a nosub error map[id:3 msg:nosub]. Here's an example:

info, err := client.GetInitialData(token)
if err != nil {
  return err
}

visitor, err := client.CreateGuest(token, fullName, email, department)
if err != nil {
  return err
}

log.Printf("Visitor created: %+v\n", visitor)

deskMessage := fmt.Sprintf("Visitor %s joined the chat:\n**%s**", fullName, message)
err = client.SendMessage(deskMessage, token, roomID)
if err != nil {
  return err
}

// subscribe to room updates
  channel, err := client.Sub("stream-room-messages", roomID)
  if err != nil {
  return fmt.Errorf("failed to subscribe to room updates: %w", err)
}

I am having a hard time determining if this is an issue with the SDK, the Go DDP implementation or a breaking change in RocketChat itself. Any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant