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.ex10
1 files changed, 9 insertions, 1 deletions
diff --git a/shard/lib/cli/cli.ex b/shard/lib/cli/cli.ex
index 380282d..54b882f 100644
--- a/shard/lib/cli/cli.ex
+++ b/shard/lib/cli/cli.ex
@@ -94,8 +94,16 @@ defmodule SCLI do
end
defp handle_command(state, ["list"]) do
- IO.puts "List of known channels:"
+ IO.puts "Private conversations:"
+ for {_chid, %SApp.Chat.PrivChat.Manifest{pk_list: pk_list}, _} <- Shard.Manager.list_shards do
+ pk_list
+ |> Enum.filter(&(&1 != state.pk))
+ |> Enum.map(fn pk -> "#{SApp.Identity.get_nick pk} #{Shard.Keys.pk_display pk}" end)
+ |> Enum.join(", ")
+ |> IO.puts
+ end
+ IO.puts "Public channels we are connected to:"
for {_chid, %SApp.Chat.Manifest{channel: chan}, _} <- Shard.Manager.list_shards do
IO.puts "##{chan}"
end