kopia lustrzana https://gitlab.com/jaywink/federation
Add url to Post, Image and Comment entities
rodzic
9f829cb044
commit
13ee55dfe8
|
@ -13,6 +13,7 @@ class Image(PublicMixin, OptionalRawContentMixin, CreatedAtMixin):
|
||||||
linked_guid = ""
|
linked_guid = ""
|
||||||
height = 0
|
height = 0
|
||||||
width = 0
|
width = 0
|
||||||
|
url = ""
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
@ -22,6 +23,7 @@ class Image(PublicMixin, OptionalRawContentMixin, CreatedAtMixin):
|
||||||
class Comment(RawContentMixin, ParticipationMixin, CreatedAtMixin):
|
class Comment(RawContentMixin, ParticipationMixin, CreatedAtMixin):
|
||||||
"""Represents a comment, linked to another object."""
|
"""Represents a comment, linked to another object."""
|
||||||
participation = "comment"
|
participation = "comment"
|
||||||
|
url = ""
|
||||||
|
|
||||||
_allowed_children = (Image,)
|
_allowed_children = (Image,)
|
||||||
|
|
||||||
|
@ -40,6 +42,7 @@ class Follow(CreatedAtMixin, TargetIDMixin):
|
||||||
class Post(RawContentMixin, PublicMixin, CreatedAtMixin, ProviderDisplayNameMixin):
|
class Post(RawContentMixin, PublicMixin, CreatedAtMixin, ProviderDisplayNameMixin):
|
||||||
"""Reflects a post, status message, etc, which will be composed from the message or to the message."""
|
"""Reflects a post, status message, etc, which will be composed from the message or to the message."""
|
||||||
location = ""
|
location = ""
|
||||||
|
url = ""
|
||||||
|
|
||||||
_allowed_children = (Image,)
|
_allowed_children = (Image,)
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ class TestGetBaseAttributes:
|
||||||
assert set(attrs) == {
|
assert set(attrs) == {
|
||||||
"created_at", "location", "provider_display_name", "public", "raw_content",
|
"created_at", "location", "provider_display_name", "public", "raw_content",
|
||||||
"signature", "base_url", "actor_id", "id", "handle", "guid", "activity", "activity_id",
|
"signature", "base_url", "actor_id", "id", "handle", "guid", "activity", "activity_id",
|
||||||
|
"url",
|
||||||
}
|
}
|
||||||
entity = Profile()
|
entity = Profile()
|
||||||
attrs = get_base_attributes(entity).keys()
|
attrs = get_base_attributes(entity).keys()
|
||||||
|
|
Ładowanie…
Reference in New Issue