mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 01:51:08 +00:00
Adds privacy fields to boost activities
This commit is contained in:
parent
3fe3b0b2d5
commit
9acb8e53d8
2 changed files with 4 additions and 2 deletions
|
@ -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"
|
||||
|
||||
|
|
|
@ -377,7 +377,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 = []
|
||||
|
|
Loading…
Reference in a new issue