aboutsummaryrefslogtreecommitdiff
path: root/shard/lib/cli/cli.ex
diff options
context:
space:
mode:
Diffstat (limited to 'shard/lib/cli/cli.ex')
-rw-r--r--shard/lib/cli/cli.ex2
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