From 2319458b00a036f5e78bce420dc393103abd0b1b Mon Sep 17 00:00:00 2001 From: freamon Date: Wed, 29 May 2024 23:53:32 +0100 Subject: [PATCH] Announce page, not create/page for Mastodon --- app/community/routes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/community/routes.py b/app/community/routes.py index 5d6455f3..23a686e6 100644 --- a/app/community/routes.py +++ b/app/community/routes.py @@ -973,12 +973,17 @@ def federate_post(community, post): '@context': default_context(), 'object': create } + microblog_announce = announce + microblog_announce['object'] = post.ap_id sent_to = 0 for instance in community.following_instances(): if instance.inbox and not current_user.has_blocked_instance(instance.id) and not instance_banned( instance.domain): - send_to_remote_instance(instance.id, community.id, announce) + if instance.software == "mastodon": + send_to_remote_instance(instance.id, community.id, microblog_announce) + else: + send_to_remote_instance(instance.id, community.id, announce) sent_to += 1 if sent_to: flash(_('Your post to %(name)s has been made.', name=community.title))