relay: don't relay mastodon announces

relayed mastodon announces are likely to result in fake direction issues, which will
result in the author seeing side effects from the relay.
This commit is contained in:
kaniini 2018-10-31 02:37:08 +00:00
parent 29c3bf4b5a
commit 48f3977ff7

View file

@ -159,6 +159,10 @@ def distill_object_id(activity):
async def handle_relay(actor, data, request): async def handle_relay(actor, data, request):
object_id = distill_object_id(data) object_id = distill_object_id(data)
# don't relay mastodon announces -- causes LRP fake direction issues
if data['type'] == 'Announce' and length(data.get('cc', [])) > 0:
return
message = { message = {
"@context": "https://www.w3.org/ns/activitystreams", "@context": "https://www.w3.org/ns/activitystreams",
"type": "Announce", "type": "Announce",