mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 04:09:16 +02:00
Fix #1038: Federated reports
This commit is contained in:
parent
40720328d7
commit
d9afed5067
34 changed files with 985 additions and 76 deletions
|
@ -165,14 +165,14 @@ def receive(activity, on_behalf_of, inbox_actor=None):
|
|||
return
|
||||
|
||||
local_to_recipients = get_actors_from_audience(activity.get("to", []))
|
||||
local_to_recipients = local_to_recipients.exclude(user=None)
|
||||
local_to_recipients = local_to_recipients.local()
|
||||
local_to_recipients = local_to_recipients.values_list("pk", flat=True)
|
||||
local_to_recipients = list(local_to_recipients)
|
||||
if inbox_actor:
|
||||
local_to_recipients.append(inbox_actor.pk)
|
||||
|
||||
local_cc_recipients = get_actors_from_audience(activity.get("cc", []))
|
||||
local_cc_recipients = local_cc_recipients.exclude(user=None)
|
||||
local_cc_recipients = local_cc_recipients.local()
|
||||
local_cc_recipients = local_cc_recipients.values_list("pk", flat=True)
|
||||
|
||||
inbox_items = []
|
||||
|
@ -457,6 +457,13 @@ def prepare_deliveries_and_inbox_items(recipient_list, type, allowed_domains=Non
|
|||
else:
|
||||
remote_inbox_urls.add(actor.shared_inbox_url or actor.inbox_url)
|
||||
urls.append(r["target"].followers_url)
|
||||
elif isinstance(r, dict) and r["type"] == "actor_inbox":
|
||||
actor = r["actor"]
|
||||
urls.append(actor.fid)
|
||||
if actor.is_local:
|
||||
local_recipients.add(actor)
|
||||
else:
|
||||
remote_inbox_urls.add(actor.inbox_url)
|
||||
|
||||
elif isinstance(r, dict) and r["type"] == "instances_with_followers":
|
||||
# we want to broadcast the activity to other instances service actors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue