Search code examples
getstream-io

Sending server-side system messages to a channel?


How can we create and send system messages to a channel from the server (Node/JS)? And how do we differentiate those from regular messages and style them? We're using the iOS SDK and the UI Kit.


Solution

  • System messages are something that Stream is planning on implementing soon, it's in the backlog.

    For now, as a workaround,

    1. Create a system-user which is instantiated server-side
    2. Channels that you'd like to send system messages to would be instantiated server-side and creates by system-user
    3. Create a custom message type
    4. Any message sent from message.user_id = system-user can be rendered using this custom message type