Mix format.
authorlain <lain@soykaf.club>
Sun, 18 Nov 2018 20:41:35 +0000 (21:41 +0100)
committerlain <lain@soykaf.club>
Sun, 18 Nov 2018 20:41:35 +0000 (21:41 +0100)
lib/pleroma/user.ex
lib/pleroma/web/web_finger/web_finger.ex

index 23e0346a5a7238acaddbb1580badf964990d77d4..e71b33304f4f16e65ad0f3481cc9f0eeef6e71e4 100644 (file)
@@ -80,8 +80,9 @@ defmodule Pleroma.User do
 
   @email_regex ~r/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
   def remote_user_creation(params) do
-    params = params
-    |> Map.put(:info, params[:info] || %{})
+    params =
+      params
+      |> Map.put(:info, params[:info] || %{})
 
     info_cng = User.Info.remote_user_creation(%User.Info{}, params[:info])
 
@@ -598,21 +599,25 @@ defmodule Pleroma.User do
   end
 
   def block_domain(user, domain) do
-    info_cng = user.info
-    |> User.Info.add_to_domain_block(domain)
+    info_cng =
+      user.info
+      |> User.Info.add_to_domain_block(domain)
 
-    cng = change(user)
-    |> put_embed(:info, info_cng)
+    cng =
+      change(user)
+      |> put_embed(:info, info_cng)
 
     update_and_set_cache(cng)
   end
 
   def unblock_domain(user, domain) do
-    info_cng = user.info
-    |> User.Info.remove_from_domain_block(domain)
+    info_cng =
+      user.info
+      |> User.Info.remove_from_domain_block(domain)
 
-    cng = change(user)
-    |> put_embed(:info, info_cng)
+    cng =
+      change(user)
+      |> put_embed(:info, info_cng)
 
     update_and_set_cache(cng)
   end
index 18cdc057e2ffca671818079c3694352881baf2a3..5bf5298401e1d6fac88e8552dbdec5fd4aded17b 100644 (file)
@@ -120,11 +120,13 @@ defmodule Pleroma.Web.WebFinger do
     else
       {:ok, pem} = Salmon.generate_rsa_pem()
 
-      info_cng = info
-      |> Pleroma.User.Info.set_keys(pem)
+      info_cng =
+        info
+        |> Pleroma.User.Info.set_keys(pem)
 
-      cng = Ecto.Changeset.change(user)
-      |> Ecto.Changeset.put_embed(:info, info_cng)
+      cng =
+        Ecto.Changeset.change(user)
+        |> Ecto.Changeset.put_embed(:info, info_cng)
 
       User.update_and_set_cache(cng)
     end