Add ability to invalidate cache entries for Apache
[akkoma] / lib / pleroma / web / web_finger.ex
index 7c009388a6714450305805bb5d1214a80bb63568..15002b29fab6bb038747b4ff4909d585a12386e5 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.WebFinger do
@@ -59,7 +59,7 @@ defmodule Pleroma.Web.WebFinger do
   end
 
   defp gather_aliases(%User{} = user) do
-    [user.ap_id] ++ user.also_known_as
+    [user.ap_id | user.also_known_as]
   end
 
   def represent_user(user, "JSON") do
@@ -76,8 +76,9 @@ defmodule Pleroma.Web.WebFinger do
     {:ok, user} = User.ensure_keys_present(user)
 
     aliases =
-      gather_aliases(user)
-      |> Enum.map(fn the_alias -> {:Alias, the_alias} end)
+      user
+      |> gather_aliases()
+      |> Enum.map(&{:Alias, &1})
 
     links =
       gather_links(user)