goch icon indicating copy to clipboard operation
goch copied to clipboard

Allow connecting to more than one chat simultaneously

Open ribice opened this issue 6 years ago • 1 comments

Currently you can have only one chat per websocket connection.

This is limited in internal/agent/agent.go where Agent struct holds single Chat.

On client, this currently works by connecting to new chat and disconnecting from previous one each time a different chat is clicked. But this prevents getting messages from other chats, although you can still show number of unread messages by invoking the unread count endpoint.

ribice avatar Jul 11 '19 14:07 ribice

https://nats-io.github.io/docs/developer/concepts/seq_num.html

At the bottom it mentions a nice pattern. So you can have many chats this way with the one connection i think.

joeblew99 avatar Jul 18 '19 10:07 joeblew99