From 5af36bf8175339ae8ea712d1b267982b64d94aa8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Mar 2021 09:52:38 +0000 Subject: [PATCH] Add tts endpoint to actor --- person.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/person.py b/person.py index b6bf9baf4..323cb11d1 100644 --- a/person.py +++ b/person.py @@ -276,12 +276,13 @@ def _createPersonBase(baseDir: str, nickname: str, domain: str, port: int, 'devices': personId + '/collections/devices', 'endpoints': { 'id': personId + '/endpoints', - 'sharedInbox': httpPrefix+'://' + domain + '/inbox', + 'sharedInbox': httpPrefix + '://' + domain + '/inbox', }, 'featured': personId + '/collections/featured', 'featuredTags': personId + '/collections/tags', 'followers': personId + '/followers', 'following': personId + '/following', + 'tts': personId + '/speaker', 'shares': personId + '/shares', 'orgSchema': None, 'skills': {}, @@ -556,6 +557,10 @@ def personUpgradeActor(baseDir: str, personJson: {}, personJson = loadJson(filename) if updateActor: + # add a speaker endpoint + if not personJson.get('tts'): + personJson['tts'] = personJson['id'] + '/speaker' + saveJson(personJson, filename) # also update the actor within the cache