diff --git a/newsdaemon.py b/newsdaemon.py index 8e490ec8e..f7edd161f 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -10,7 +10,7 @@ import os import time from collections import OrderedDict from newswire import getDictFromNewswire -from posts import createPublicPost +from posts import createNewsPost from utils import saveJson from utils import getStatusNumber @@ -94,15 +94,11 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str, followersOnly = False useBlurhash = False - commentsEnabled = False - blog = createPublicPost(baseDir, - 'news', domain, port, httpPrefix, - rssDescription, followersOnly, False, - False, commentsEnabled, - None, None, None, useBlurhash, - None, None, rssTitle, - False, - None, None, None) + blog = createNewsPost(baseDir, + 'news', domain, port, httpPrefix, + rssDescription, followersOnly, False, + None, None, None, useBlurhash, + rssTitle) if not blog: continue diff --git a/posts.py b/posts.py index a5331e83f..a101c3dcb 100644 --- a/posts.py +++ b/posts.py @@ -1193,6 +1193,33 @@ def createBlogPost(baseDir: str, return blog +def createNewsPost(baseDir: str, + nickname: str, domain: str, port: int, httpPrefix: str, + content: str, followersOnly: bool, saveToFile: bool, + attachImageFilename: str, mediaType: str, + imageDescription: str, useBlurhash: bool, + subject: str) -> {}: + clientToServer = False + inReplyTo = None + inReplyToAtomUri = None + schedulePost = False, + eventDate = None + eventTime = None + location = None + blog = \ + createPublicPost(baseDir, + nickname, domain, port, httpPrefix, + content, followersOnly, saveToFile, + clientToServer, + attachImageFilename, mediaType, + imageDescription, useBlurhash, + inReplyTo, inReplyToAtomUri, subject, + schedulePost, + eventDate, eventTime, location) + blog['object']['type'] = 'Article' + return blog + + def createQuestionPost(baseDir: str, nickname: str, domain: str, port: int, httpPrefix: str, content: str, qOptions: [],