diff options
Diffstat (limited to 'shardweb/lib/shard_web/controllers/room_controller.ex')
-rw-r--r-- | shardweb/lib/shard_web/controllers/room_controller.ex | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/shardweb/lib/shard_web/controllers/room_controller.ex b/shardweb/lib/shard_web/controllers/room_controller.ex index 8c98aa6..d24649b 100644 --- a/shardweb/lib/shard_web/controllers/room_controller.ex +++ b/shardweb/lib/shard_web/controllers/room_controller.ex @@ -1,27 +1,9 @@ defmodule ShardWeb.RoomController do use ShardWeb, :controller - require Logger - import PhoenixGon.Controller - def show(conn, %{"room" => room}) do - pk = get_session(conn, :pk) - {pk, conn} = cond do - pk == nil || not Shard.Keys.have_sk? pk -> - pk = Shard.Keys.get_any_identity - conn = put_session(conn, :pk, pk) - {pk, conn} - true -> - {pk, conn} - end - - name = SApp.Identity.get_nick pk - conn = put_gon(conn, chat_room: room) - conn = put_gon(conn, pk: (pk|>Base.encode16)) render conn, "show.html", - room: room, - pk: pk, - name: name + room: room end end |