diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-12 16:38:11 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-12 16:38:11 +0200 |
commit | f5b4131160520a2540445619188c3c8e0f37da37 (patch) | |
tree | b966fbbe827a004caa65a87dfb8672754ce022ab /shardweb/lib/channels/chat_channel.ex | |
parent | 0d358f6f699a5ce04ffe1bccf4f375b5f321391c (diff) | |
download | shard-f5b4131160520a2540445619188c3c8e0f37da37.tar.gz shard-f5b4131160520a2540445619188c3c8e0f37da37.zip |
Notifications for chat ; useless user info page
Diffstat (limited to 'shardweb/lib/channels/chat_channel.ex')
-rw-r--r-- | shardweb/lib/channels/chat_channel.ex | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/shardweb/lib/channels/chat_channel.ex b/shardweb/lib/channels/chat_channel.ex index f898602..a413be1 100644 --- a/shardweb/lib/channels/chat_channel.ex +++ b/shardweb/lib/channels/chat_channel.ex @@ -47,6 +47,7 @@ defmodule ShardWeb.ChatChannel do message: msg, }) end) + GenServer.cast(socket.assigns.pid, :mark_read) {:noreply, socket} end @@ -57,10 +58,12 @@ defmodule ShardWeb.ChatChannel do push socket, "shout", %{"name" => nick, "pk16" => Shard.Keys.pk_display(pk), "message" => msg} + GenServer.cast(socket.assigns.pid, :mark_read) {:noreply, socket} end def handle_info({:chat_send, _, _}, socket) do + GenServer.cast(socket.assigns.pid, :mark_read) {:noreply, socket} end |