projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
v2 Suggestions: don't skip visibility check
[akkoma]
/
lib
/
pleroma
/
activity
/
queries.ex
diff --git
a/lib/pleroma/activity/queries.ex
b/lib/pleroma/activity/queries.ex
index c99aae44bb27428eedc2e8bbf84a694b2e55cd10..4632651b026da07cbf4ff66b434531d2cb13d2e2 100644
(file)
--- a/
lib/pleroma/activity/queries.ex
+++ b/
lib/pleroma/activity/queries.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Activity.Queries do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Activity.Queries do
@@
-14,6
+14,11
@@
defmodule Pleroma.Activity.Queries do
alias Pleroma.Activity
alias Pleroma.User
alias Pleroma.Activity
alias Pleroma.User
+ @spec by_id(query(), String.t()) :: query()
+ def by_id(query \\ Activity, id) do
+ from(a in query, where: a.id == ^id)
+ end
+
@spec by_ap_id(query, String.t()) :: query
def by_ap_id(query \\ Activity, ap_id) do
from(
@spec by_ap_id(query, String.t()) :: query
def by_ap_id(query \\ Activity, ap_id) do
from(