User: Add function to get AP ids from nicknames.
This commit is contained in:
parent
9789e000b0
commit
2b664b048e
2 changed files with 20 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue