Connecting to a channel for chat app

If I understand the use case correctly, it sounds like you want a notification when one of your friends sends a message? You could check for presence and then send a notification if the recipient is not online right now. At least 3 options:

  • If the user is in the app but not connected to the chat channel, you could use a UI element that listens to the Phoenix channel and displays/links to the chat message.
  • Outside the app, for web apps you could use web push notifications. For mobile apps, there’s an Elixir library.
1 Like