diff options
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r-- | mediagoblin/db/models.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 91efc0b6..4377f60f 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -455,7 +455,9 @@ class MediaEntry(Base, MediaEntryMixin): }, "fullImage":{ "url": request.host_url + self.original_url[1:], - } + }, + "published": self.created.isoformat(), + "updated": self.created.isoformat(), } if show_comments: @@ -465,7 +467,13 @@ class MediaEntry(Base, MediaEntryMixin): # we only want to include replies if there are any. context["replies"] = { "totalItems": total, - "items": comments + "items": comments, + "url": request.urlgen( + "mediagoblin.federation.object.comments", + objectType=self.objectType, + uuid=self.slug, + qualified=True + ), } return context |