mirror of https://gitlab.com/bashrc2/epicyon
Don't overwrite existing inbox arrivals
parent
3ae0f98f7c
commit
e33d306970
13
inbox.py
13
inbox.py
|
@ -1127,6 +1127,9 @@ def inboxAfterCapabilities(session,keyId: str,handle: str,messageJson: {}, \
|
||||||
print('DEBUG: object capabilities passed')
|
print('DEBUG: object capabilities passed')
|
||||||
print('copy queue file from '+queueFilename+' to '+destinationFilename)
|
print('copy queue file from '+queueFilename+' to '+destinationFilename)
|
||||||
|
|
||||||
|
if os.path.isfile(destinationFilename):
|
||||||
|
return True
|
||||||
|
|
||||||
if messageJson.get('postNickname'):
|
if messageJson.get('postNickname'):
|
||||||
with open(destinationFilename, 'w+') as fp:
|
with open(destinationFilename, 'w+') as fp:
|
||||||
commentjson.dump(messageJson['post'], fp, indent=4, sort_keys=False)
|
commentjson.dump(messageJson['post'], fp, indent=4, sort_keys=False)
|
||||||
|
@ -1473,10 +1476,12 @@ def runInboxQueue(projectVersion: str, \
|
||||||
# any checking will needs to be handled at the time when inbox
|
# any checking will needs to be handled at the time when inbox
|
||||||
# GET happens on individual accounts.
|
# GET happens on individual accounts.
|
||||||
# See posts.py/createBoxBase
|
# See posts.py/createBoxBase
|
||||||
if len(recipientsDictFollowers)>0:
|
if len(recipientsDictFollowers)>0:
|
||||||
with open(queueJson['destination'].replace(inboxHandle,inboxHandle), 'w') as fp:
|
sharedInboxPostFilename=queueJson['destination'].replace(inboxHandle,inboxHandle)
|
||||||
commentjson.dump(queueJson['post'],fp,indent=4, \
|
if not os.path.isfile(sharedInboxPostFilename):
|
||||||
sort_keys=False)
|
with open(sharedInboxPostFilename, 'w') as fp:
|
||||||
|
commentjson.dump(queueJson['post'],fp,indent=4, \
|
||||||
|
sort_keys=False)
|
||||||
|
|
||||||
# for posts addressed to specific accounts
|
# for posts addressed to specific accounts
|
||||||
for handle,capsId in recipientsDict.items():
|
for handle,capsId in recipientsDict.items():
|
||||||
|
|
Loading…
Reference in New Issue