forked from indymedia/epicyon
Always create file for scheduled posts
parent
3dc276e0de
commit
6ed8f89c04
22
posts.py
22
posts.py
|
@ -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, \
|
||||||
|
|
Loading…
Reference in New Issue