diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-10-26 01:24:22 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-10-26 01:24:22 +0000 |
commit | f6cb963df208a1f24aa195fda4ed894caac9e7bc (patch) | |
tree | 388020141474ba51ac0400d5c9d2ac4adbc34bf0 /lib | |
parent | 72031e80d7cf5aa6bdfd0604d5b6768c2c25481a (diff) | |
download | pleroma-f6cb963df208a1f24aa195fda4ed894caac9e7bc.tar.gz |
activitypub utils: fix recipient check when the message is unaddressed (mastodon)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/utils.ex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index 266667f81..d6ac2dd8c 100644 --- 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 |