Ensure ActivitypubComment can have public attribute

This is required since unlike our base Comment, Activitypub
originating comments will possibly have a public namespace
as a target. We represent that internally with the "public"
attribute.
merge-requests/157/merge
Jason Robinson 2019-10-01 20:59:31 +03:00
rodzic 8d2bc74556
commit 041a44a525
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -8,7 +8,7 @@ from federation.entities.activitypub.constants import (
CONTEXT_LD_SIGNATURES) CONTEXT_LD_SIGNATURES)
from federation.entities.activitypub.enums import ActorType, ObjectType, ActivityType from federation.entities.activitypub.enums import ActorType, ObjectType, ActivityType
from federation.entities.base import Profile, Post, Follow, Accept, Comment, Retraction, Share, Image from federation.entities.base import Profile, Post, Follow, Accept, Comment, Retraction, Share, Image
from federation.entities.mixins import RawContentMixin, BaseEntity from federation.entities.mixins import RawContentMixin, BaseEntity, PublicMixin
from federation.entities.utils import get_base_attributes from federation.entities.utils import get_base_attributes
from federation.outbound import handle_send from federation.outbound import handle_send
from federation.types import UserType from federation.types import UserType
@ -84,7 +84,7 @@ class ActivitypubAccept(ActivitypubEntityMixin, Accept):
return as2 return as2
class ActivitypubNoteMixin(AttachImagesMixin, CleanContentMixin, ActivitypubEntityMixin): class ActivitypubNoteMixin(AttachImagesMixin, CleanContentMixin, PublicMixin, ActivitypubEntityMixin):
_type = ObjectType.NOTE.value _type = ObjectType.NOTE.value
def add_object_tags(self) -> List[Dict]: def add_object_tags(self) -> List[Dict]: