diff options
| author | Melonai <einebeere@gmail.com> | 2021-05-09 03:11:14 +0200 |
|---|---|---|
| committer | Melonai <einebeere@gmail.com> | 2021-05-09 03:11:14 +0200 |
| commit | fd9caa877db79a1436ee2bc7cd73c1c5792e5205 (patch) | |
| tree | 1c1576a23a39e512634a4f7d5ca41736c1b7af86 /lib/rook_web | |
| parent | 09693b979efe3c9c7ea64f79d97a1f0b53f7c49e (diff) | |
| download | rook-fd9caa877db79a1436ee2bc7cd73c1c5792e5205.tar.zst rook-fd9caa877db79a1436ee2bc7cd73c1c5792e5205.zip | |
Monitor share channels
Diffstat (limited to 'lib/rook_web')
| -rw-r--r-- | lib/rook_web/channels/share_channel.ex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rook_web/channels/share_channel.ex b/lib/rook_web/channels/share_channel.ex index fde0096..7454986 100644 --- a/lib/rook_web/channels/share_channel.ex +++ b/lib/rook_web/channels/share_channel.ex @@ -3,9 +3,14 @@ defmodule RookWeb.ShareChannel do def join("share:" <> token, _params, socket) do if token == socket.assigns[:token] do + :ok = Rook.ShareMonitor.track(self(), token) {:ok, socket} else {:error, %{reason: "Wrong token."}} end end + + def handle_close(_requests) do + # Notify all requests that share is gone. + end end |
