Fix #1040 - Comments should have published attribute
This commit is contained in:
parent
692e8e7848
commit
1c8f52daee
@ -769,12 +769,15 @@ class MediaComment(Base, MediaCommentMixin):
|
|||||||
)
|
)
|
||||||
media = MediaEntry.query.filter_by(id=self.media_entry).first()
|
media = MediaEntry.query.filter_by(id=self.media_entry).first()
|
||||||
author = self.get_author
|
author = self.get_author
|
||||||
|
published = UTC.localize(self.created)
|
||||||
context = {
|
context = {
|
||||||
"id": href,
|
"id": href,
|
||||||
"objectType": self.object_type,
|
"objectType": self.object_type,
|
||||||
"content": self.content,
|
"content": self.content,
|
||||||
"inReplyTo": media.serialize(request, show_comments=False),
|
"inReplyTo": media.serialize(request, show_comments=False),
|
||||||
"author": author.serialize(request)
|
"author": author.serialize(request),
|
||||||
|
"published": published.isoformat(),
|
||||||
|
"updated": published.isoformat(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.location:
|
if self.location:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user