Always create file for scheduled posts

main
Bob Mottram 2020-01-12 20:53:00 +00:00
parent 3dc276e0de
commit 6ed8f89c04
1 changed files with 11 additions and 11 deletions

View File

@ -717,18 +717,18 @@ def createPostBase(baseDir: str,nickname: str,domain: str,port: int, \
modFile.write(newPostId+'\n') modFile.write(newPostId+'\n')
modFile.close() modFile.close()
if saveToFile: if schedulePost:
outboxName='outbox' if eventDate and eventTime:
if schedulePost: # add an item to the scheduled post index file
if eventDate and eventTime: addSchedulePost(baseDir,nickname,domain,eventDateStr,postId)
outboxName='scheduled' savePostToBox(baseDir,httpPrefix,newPostId, \
# add an item to the scheduled post index file nickname,domain,newPost,'scheduled')
addSchedulePost(baseDir,nickname,domain,eventDateStr,postId) else:
else: print('Unable to create scheduled post without date and time values')
print('Unable to create scheduled post without date and time values') return newPost
return newPost elif saveToFile:
savePostToBox(baseDir,httpPrefix,newPostId, \ savePostToBox(baseDir,httpPrefix,newPostId, \
nickname,domain,newPost,outboxName) nickname,domain,newPost,'outbox')
return newPost return newPost
def outboxMessageCreateWrap(httpPrefix: str, \ def outboxMessageCreateWrap(httpPrefix: str, \