summaryrefslogtreecommitdiff
path: root/lib/polyjuice/client/endpoint/post_join.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/polyjuice/client/endpoint/post_join.ex')
-rw-r--r--lib/polyjuice/client/endpoint/post_join.ex28
1 files changed, 16 insertions, 12 deletions
diff --git a/lib/polyjuice/client/endpoint/post_join.ex b/lib/polyjuice/client/endpoint/post_join.ex
index 8fb742c..66007cf 100644
--- a/lib/polyjuice/client/endpoint/post_join.ex
+++ b/lib/polyjuice/client/endpoint/post_join.ex
@@ -42,23 +42,27 @@ defmodule Polyjuice.Client.Endpoint.PostJoin do
base_url
) do
e = &URI.encode_www_form/1
- body = Poison.encode!(
- if third_party_signed do
- %{"third_party_signed" => third_party_signed}
- else
- %{}
- end
- )
+
+ body =
+ Poison.encode!(
+ if third_party_signed do
+ %{"third_party_signed" => third_party_signed}
+ else
+ %{}
+ end
+ )
url = %{
URI.merge(
base_url,
"#{Polyjuice.Client.prefix_r0()}/join/#{e.(room)}"
- ) | query: if servers == [] do
- nil
- else
- Enum.join(Enum.map(servers, &("server_name=#{e.(&1)}")), "&")
- end
+ )
+ | query:
+ if servers == [] do
+ nil
+ else
+ Enum.join(Enum.map(servers, &"server_name=#{e.(&1)}"), "&")
+ end
}
%Polyjuice.Client.Endpoint.HttpSpec{