From 8f0c6e5b352fcc37aded9fcbc2b160697c5a1d4f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 11 Mar 2021 10:15:25 +0000 Subject: [PATCH] Include publication date in speaker endpoint --- speaker.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/speaker.py b/speaker.py index 58c04b932..cdce66140 100644 --- a/speaker.py +++ b/speaker.py @@ -279,7 +279,7 @@ def _speakerEndpointJson(displayName: str, summary: str, links: [], gender: str, postId: str, postDM: bool, postReply: bool, followRequestsExist: bool, - likedBy: str, postCal: bool, + likedBy: str, published: str, postCal: bool, postShare: bool, themeName: str) -> {}: """Returns a json endpoint for the TTS speaker """ @@ -288,6 +288,7 @@ def _speakerEndpointJson(displayName: str, summary: str, "summary": summary, "content": content, "say": sayContent, + "published": published, "imageDescription": imageDescription, "detectedLinks": links, "id": postId, @@ -433,6 +434,10 @@ def _postToSpeakerJson(baseDir: str, httpPrefix: str, imageDescription += \ img['name'] + '. ' + published = '' + if postJsonObject['object'].get('published'): + published = postJsonObject['object']['published'] + summary = '' if postJsonObject['object'].get('summary'): if isinstance(postJsonObject['object']['summary'], str): @@ -492,7 +497,7 @@ def _postToSpeakerJson(baseDir: str, httpPrefix: str, detectedLinks, gender, postId, postDM, postReply, followRequestsExist, - likedBy, + likedBy, published, postCal, postShare, themeName)