From 097a3ace0922449c56e9b4dee5ab7652cb9429cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Ro=C5=BCnawski?= Date: Thu, 4 May 2023 14:34:43 +0200 Subject: [PATCH] Add missing notifications --- lib/jellyfish/notifier.ex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/jellyfish/notifier.ex b/lib/jellyfish/notifier.ex index d1619d9..1cb6b87 100644 --- a/lib/jellyfish/notifier.ex +++ b/lib/jellyfish/notifier.ex @@ -26,7 +26,7 @@ defmodule Jellyfish.Notifier do @auth_timeout 2000 @doc """ - Starts the Notifier process and connects to Jellyfish. + Starts the Notifier process and connects to Jellyfish. Acts like `start/1` but links to the calling process. @@ -38,10 +38,10 @@ defmodule Jellyfish.Notifier do end @doc """ - Starts the Notifier process and connects to Jellyfish. + Starts the Notifier process and connects to Jellyfish. Received notifications are send to the calling process in - a form of `{:jellyfish, msg}`, where `msg` is + a form of `{:jellyfish, msg}`, where `msg` is `type` or `{type, room_id}` or `{type, room_id, (peer/component)_id}`. Refer to [Jellyfish docs](https://jellyfish-dev.github.io/jellyfish-docs/) to learn more about server notifications. @@ -115,8 +115,10 @@ defmodule Jellyfish.Notifier do decoded_type = case type do "authenticated" -> :authenticated + "roomCrashed" -> :room_crashed "peerConnected" -> :peer_connected - "peerDisconnected" -> :peer_disconected + "peerDisconnected" -> :peer_disconnected + "peerCrashed" -> :peer_crashed "componentCrashed" -> :component_crashed _other -> nil end