Closed dcsan closed 4 years ago
there are get_room_messages
and other APIs, but that's not really the point of using a realtime API. It's really weird you have an SDK with no realtime/subscribe events.
Looking into the client SDK https://github.com/pusher/chatkit-client-js/blob/master/src/room-subscription.js
it seems like a lot of support libraries would also have to be ported from the client, CursorSubscription etc.
Is there any work done on this? It's exactly what I was hoping that chatkit would provide...
is there a simple example of how to subscribe to events like #new-message https://docs.pusher.com/chatkit/reference/subscription-events#new-message
without having to use all the code in the current client. this is to get an MVP up.
can you give any info on how the chatkit-client and your channels models work together?
does a "room" map onto a channel? can i mix the two? eg I could just use the channels SDK and subscribe to a room like:
var channel = pusher.subscribe('my-channel');
channel.bind('my-event', function(data) {
alert('Received my-event with message: ' + data.message);
});
Hi!
The server SDK does not support client side functionality. If you'd like to build a chat bot, then the best way to do this is to use web hooks. (https://docs.pusher.com/chatkit/webhooks).
Regarding channels and Chatkit, they do not work together in anyway and are completely separate products solving different problems, so you cannot mix the two.
Closing as stale.
What?
I can't see any method from the current docs to subscribe to a room from the node/server SDK
tried based on client JS/SDK and get this:
When i try to use the client SDK it gives errors around
window not defined
. I guess someone hardcoded something in there.Suggested improvements
How to get events on the server side from a room?