I’m wondering if it’s possible to add custom functions to Phoenix channels? Basically, I’d like my chat server to expose some convenience functions like getUsersInRoom(room_id) and isOnline(user_id) and I have no clue how this can be done.
Can anyone explain what I need to do for this at the server end? And and the client end?
Thank you, indeed! That was what I was looking for.
For those viewing this thread later, what I needed was a way to add custom events to the channel. My question, however, looks confusing because it reflected my ignorance – it wasn’t functions that I needed!