Create a scheduled post index

merge-requests/6/head
Bob Mottram 2020-01-12 12:58:05 +00:00
parent 9744db2339
commit 9409f6dcc4
1 changed files with 6 additions and 1 deletions

View File

@ -564,7 +564,7 @@ def createPostBase(baseDir: str,nickname: str,domain: str,port: int, \
sensitive=True
if replyToJson['object'].get('summary'):
summary=replyToJson['object']['summary']
eventDateStr=None
if eventDate:
eventName=summary
if not eventName:
@ -720,6 +720,11 @@ def createPostBase(baseDir: str,nickname: str,domain: str,port: int, \
if schedulePost:
if eventDate and eventTime:
outboxName='scheduled'
scheduleIndexFile=baseDir+'/accounts/schedule.txt'
scheduleFile=open(scheduleIndexFile, "a+")
if scheduleFile:
scheduleFile.write(eventDateStr+' '+newPostId+'\n')
scheduleFile.close()
else:
print('Unable to create scheduled post without date and time values')
return newPost