aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-06-03 18:16:11 +0200
committerlain <lain@soykaf.club>2019-06-03 18:16:11 +0200
commit2b664b048eac5f37421ab958e26efed9c158c8d0 (patch)
tree37fa34a53d9c6af35ed00b966bd817ee9b22e154 /lib
parent9789e000b05621435dc0c03833f564481e0b80e6 (diff)
downloadpleroma-2b664b048eac5f37421ab958e26efed9c158c8d0.tar.gz
User: Add function to get AP ids from nicknames.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/user.ex8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index 474cd8c1a..dc534b05c 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -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