projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'feature/mrf-anti-link-spam' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
utils.ex
diff --git
a/lib/pleroma/web/activity_pub/utils.ex
b/lib/pleroma/web/activity_pub/utils.ex
index b292d7d8d57c8de9e2af8c856aab16d34ee0fda1..10ff572a23ee11eabb60569ab8251a6c1ac980f5 100644
(file)
--- a/
lib/pleroma/web/activity_pub/utils.ex
+++ b/
lib/pleroma/web/activity_pub/utils.ex
@@
-376,8
+376,8
@@
defmodule Pleroma.Web.ActivityPub.Utils do
@doc """
Updates a follow activity's state (for locked accounts).
"""
@doc """
Updates a follow activity's state (for locked accounts).
"""
- def update_follow_state(
- %Activity{data: %{"actor" => actor, "object" => object
, "state" => "pending"
}} = activity,
+ def update_follow_state
_for_all
(
+ %Activity{data: %{"actor" => actor, "object" => object}} = activity,
state
) do
try do
state
) do
try do
@@
-794,10
+794,11
@@
defmodule Pleroma.Web.ActivityPub.Utils do
query =
from(
[activity, object: object] in Activity.with_preloaded_object(Activity),
query =
from(
[activity, object: object] in Activity.with_preloaded_object(Activity),
+ where: fragment("(?)->>'type' = 'Create'", activity.data),
where: fragment("(?)->>'actor' = ?", activity.data, ^actor),
where:
fragment(
where: fragment("(?)->>'actor' = ?", activity.data, ^actor),
where:
fragment(
- "(?)->'inReplyTo' = ?",
+ "(?)->
>
'inReplyTo' = ?",
object.data,
^to_string(id)
),
object.data,
^to_string(id)
),