aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib/controllers/chat_controller.ex
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-11-02 14:04:52 +0100
committerAlex Auvolat <alex@adnab.me>2018-11-02 14:04:52 +0100
commit94b1f6b0ae387b7fcb0714a4c6e213212097a100 (patch)
tree33fa5f6f626b075c389b4bb977d9fbb5e7e05c37 /shardweb/lib/controllers/chat_controller.ex
parent3baa53f1da7f581619b066832b8303efbe9a46ba (diff)
downloadshard-94b1f6b0ae387b7fcb0714a4c6e213212097a100.tar.gz
shard-94b1f6b0ae387b7fcb0714a4c6e213212097a100.zip
Directory stuff
Diffstat (limited to 'shardweb/lib/controllers/chat_controller.ex')
-rw-r--r--shardweb/lib/controllers/chat_controller.ex8
1 files changed, 6 insertions, 2 deletions
diff --git a/shardweb/lib/controllers/chat_controller.ex b/shardweb/lib/controllers/chat_controller.ex
index 080ee61..1ca66d4 100644
--- a/shardweb/lib/controllers/chat_controller.ex
+++ b/shardweb/lib/controllers/chat_controller.ex
@@ -4,11 +4,13 @@ defmodule ShardWeb.ChatController do
def chat(conn, %{"chan" => chan}) do
conn = put_gon(conn, chat_channel: "chat:" <> chan)
- shard = %SApp.Chat.Manifest{channel: chan} |> SData.term_hash
+ manifest = %SApp.Chat.Manifest{channel: chan}
+ shard = manifest |> SData.term_hash
render conn, "chat.html",
public: true,
shard: shard,
+ manifest: manifest,
chan: chan
end
@@ -37,10 +39,12 @@ defmodule ShardWeb.ChatController do
|> Enum.map(&SApp.Identity.get_nick/1)
|> Enum.join(", ")
- shard = [conn.assigns.pk | pk_list] |> SApp.Chat.PrivChat.Manifest.new |> SData.term_hash
+ manifest = [conn.assigns.pk | pk_list] |> SApp.Chat.PrivChat.Manifest.new
+ shard = manifest |> SData.term_hash
render conn, "chat.html",
public: false,
+ manifest: manifest,
shard: shard,
nicks: name
else