projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/translations' into develop
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
mrf
/
force_bot_unlisted_policy.ex
diff --git
a/lib/pleroma/web/activity_pub/mrf/force_bot_unlisted_policy.ex
b/lib/pleroma/web/activity_pub/mrf/force_bot_unlisted_policy.ex
index ea9c3d3f5c945520faddd49f137af07125a904b7..fa6b93333c75c9c45ba5f1b28b038647fcf2a6ca 100644
(file)
--- a/
lib/pleroma/web/activity_pub/mrf/force_bot_unlisted_policy.ex
+++ b/
lib/pleroma/web/activity_pub/mrf/force_bot_unlisted_policy.ex
@@
-1,10
+1,10
@@
# 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.Web.ActivityPub.MRF.ForceBotUnlistedPolicy do
alias Pleroma.User
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy do
alias Pleroma.User
- @behaviour Pleroma.Web.ActivityPub.MRF
+ @behaviour Pleroma.Web.ActivityPub.MRF
.Policy
@moduledoc "Remove bot posts from federated timeline"
require Pleroma.Constants
@moduledoc "Remove bot posts from federated timeline"
require Pleroma.Constants
@@
-17,13
+17,14
@@
defmodule Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy do
@impl true
def filter(
%{
@impl true
def filter(
%{
- "type" =>
"Create"
,
+ "type" =>
type
,
"to" => to,
"cc" => cc,
"actor" => actor,
"object" => object
} = message
"to" => to,
"cc" => cc,
"actor" => actor,
"object" => object
} = message
- ) do
+ )
+ when type in ["Create", "Update"] do
user = User.get_cached_by_ap_id(actor)
isbot = check_if_bot(user)
user = User.get_cached_by_ap_id(actor)
isbot = check_if_bot(user)