Add recipients building for Update

pull/20/head
Dashie 2018-11-12 10:11:58 +01:00
rodzic 473302d3a9
commit b704b68f90
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: C2D57B325840B755
1 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -758,6 +758,17 @@ class Update(BaseActivity):
OBJECT_REQUIRED = True
ACTOR_REQUIRED = True
def _recipients(self) -> List[str]:
# TODO(tsileo): audience support?
recipients = []
for field in ["to", "cc", "bto", "bcc"]:
if field in self._data:
recipients.extend(_to_list(self._data[field]))
recipients.extend(self.get_object()._recipients())
return recipients
class Create(BaseActivity):
ACTIVITY_TYPE = ActivityType.CREATE