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.close()
if saveToFile:
outboxName='outbox'
if schedulePost:
if eventDate and eventTime:
outboxName='scheduled'
# add an item to the scheduled post index file
addSchedulePost(baseDir,nickname,domain,eventDateStr,postId)
else:
print('Unable to create scheduled post without date and time values')
return newPost
if schedulePost:
if eventDate and eventTime:
# add an item to the scheduled post index file
addSchedulePost(baseDir,nickname,domain,eventDateStr,postId)
savePostToBox(baseDir,httpPrefix,newPostId, \
nickname,domain,newPost,'scheduled')
else:
print('Unable to create scheduled post without date and time values')
return newPost
elif saveToFile:
savePostToBox(baseDir,httpPrefix,newPostId, \
nickname,domain,newPost,outboxName)
nickname,domain,newPost,'outbox')
return newPost
def outboxMessageCreateWrap(httpPrefix: str, \