mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
Announce page, not create/page for Mastodon
This commit is contained in:
parent
9dc2d48aca
commit
2319458b00
1 changed files with 6 additions and 1 deletions
|
@ -973,12 +973,17 @@ def federate_post(community, post):
|
||||||
'@context': default_context(),
|
'@context': default_context(),
|
||||||
'object': create
|
'object': create
|
||||||
}
|
}
|
||||||
|
microblog_announce = announce
|
||||||
|
microblog_announce['object'] = post.ap_id
|
||||||
|
|
||||||
sent_to = 0
|
sent_to = 0
|
||||||
for instance in community.following_instances():
|
for instance in community.following_instances():
|
||||||
if instance.inbox and not current_user.has_blocked_instance(instance.id) and not instance_banned(
|
if instance.inbox and not current_user.has_blocked_instance(instance.id) and not instance_banned(
|
||||||
instance.domain):
|
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
|
sent_to += 1
|
||||||
if sent_to:
|
if sent_to:
|
||||||
flash(_('Your post to %(name)s has been made.', name=community.title))
|
flash(_('Your post to %(name)s has been made.', name=community.title))
|
||||||
|
|
Loading…
Add table
Reference in a new issue