projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
72031e8
)
Merge branch 'bugfix/unshared-inbox-check' into 'develop'
author
kaniini
<nenolod@gmail.com>
Fri, 26 Oct 2018 01:36:07 +0000
(
01:36
+0000)
committer
kaniini
<nenolod@gmail.com>
Fri, 26 Oct 2018 01:36:07 +0000
(
01:36
+0000)
activitypub utils: fix recipient check when the message is unaddressed (mastodon)
See merge request pleroma/pleroma!392
lib/pleroma/web/activity_pub/utils.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/activity_pub/utils.ex
b/lib/pleroma/web/activity_pub/utils.ex
index 266667f8109720ee05ae35374800147eaddf3b31..d6ac2dd8c294c0af345500a061aca89ec2f8c3cb 100644
(file)
--- a/
lib/pleroma/web/activity_pub/utils.ex
+++ b/
lib/pleroma/web/activity_pub/utils.ex
@@
-37,6
+37,11
@@
defmodule Pleroma.Web.ActivityPub.Utils do
recipient_in_collection(ap_id, params["bcc"]) ->
true
+ # if the message is unaddressed at all, then assume it is directly addressed
+ # to the recipient
+ !params["to"] && !params["cc"] && !params["bto"] && !params["bcc"] ->
+ true
+
true ->
false
end