diff --git a/newsdaemon.py b/newsdaemon.py index d6166c5d..e6dc0c26 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -464,11 +464,12 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str, htId = tagName.replace('#', '') hashtagUrl = \ httpPrefix + "://" + domainFull + "/tags/" + htId - blog['object']['tag'][htId] = { + newTag = { 'href': hashtagUrl, 'name': tagName, 'type': 'Hashtag' } + blog['object']['tag'].append(newTag) if tagName in blog['object']['content']: hashtagHtml = \ " []: return [] if not postJsonObject['object'].get('tag'): return [] - if not isinstance(postJsonObject['object']['tag'], dict): + if not isinstance(postJsonObject['object']['tag'], list): return [] tags = [] - for tg in postJsonObject['object']['tag'].items(): + for tg in postJsonObject['object']['tag']: if not isinstance(tg, dict): continue if not tg.get('name'):