Adds privacy fields to boost activities

This commit is contained in:
Mouse Reeve 2021-03-24 13:35:49 -07:00
parent c3a750f5da
commit f546dfb005
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,5 @@
""" undo wrapper activity """
from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import List
from django.apps import apps
@ -192,6 +192,8 @@ class Announce(Verb):
""" boosting a status """
published: str
to: List[str] = field(default_factory=lambda: [])
cc: List[str] = field(default_factory=lambda: [])
object: str
type: str = "Announce"

View file

@ -370,7 +370,7 @@ class Boost(ActivityMixin, Status):
""" the user field is "actor" here instead of "attributedTo" """
super().__init__(*args, **kwargs)
reserve_fields = ["user", "boosted_status", "published_date"]
reserve_fields = ["user", "boosted_status", "published_date", "privacy"]
self.simple_fields = [f for f in self.simple_fields if f.name in reserve_fields]
self.activity_fields = self.simple_fields
self.many_to_many_fields = []