Merge branch 'oauth_consumer_support_code' into 'develop'
[akkoma] / lib / pleroma / user.ex
index 5c91dc7d40a2c525242bef61398205ba7d0af47c..dc534b05c1e42aa9da56abba0dcf01cdafbf1461 100644 (file)
@@ -758,7 +758,7 @@ defmodule Pleroma.User do
 
     from(s in subquery(boost_search_rank_query(distinct_query, for_user)),
       order_by: [desc: s.search_rank],
-      limit: 20
+      limit: 40
     )
   end
 
@@ -1441,4 +1441,12 @@ defmodule Pleroma.User do
       update_and_set_cache(cng)
     end
   end
+
+  def get_ap_ids_by_nicknames(nicknames) do
+    from(u in User,
+      where: u.nickname in ^nicknames,
+      select: u.ap_id
+    )
+    |> Repo.all()
+  end
 end