diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-12 17:01:10 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-12 17:01:10 +0200 |
commit | 7bc609a85b43ed86eccb9cd40d9db31f15aaba1d (patch) | |
tree | 80b31e39e029bb89793d95fab76bf8310031d76d /shard/lib/cli | |
parent | 76749e8f64ce3caf7e0e5c17dfee373dcf4dfe6e (diff) | |
download | shard-7bc609a85b43ed86eccb9cd40d9db31f15aaba1d.tar.gz shard-7bc609a85b43ed86eccb9cd40d9db31f15aaba1d.zip |
More notifications going around
Diffstat (limited to 'shard/lib/cli')
-rw-r--r-- | shard/lib/cli/cli.ex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shard/lib/cli/cli.ex b/shard/lib/cli/cli.ex index 3b52fa5..319f96b 100644 --- a/shard/lib/cli/cli.ex +++ b/shard/lib/cli/cli.ex @@ -114,6 +114,7 @@ defmodule SCLI do defp handle_command(state, ["join", qchan]) do pid = Shard.Manager.find_or_start %SApp.Chat.Manifest{channel: qchan} + GenServer.cast(pid, {:subscribe, self()}) IO.puts "Switching to ##{qchan}" %{state | room_pid: pid} end @@ -144,6 +145,7 @@ defmodule SCLI do if Enum.all?(pk_list, &(&1 != :error)) do manifest = SApp.Chat.PrivChat.Manifest.new([state.pk | pk_list]) pid = Shard.Manager.find_or_start manifest + GenServer.cast(pid, {:subscribe, self()}) IO.puts "Switching to private conversation." %{state | room_pid: pid} else |