Locate within announce cache

master
Bob Mottram 2019-09-02 17:23:03 +01:00
parent 2c30f76ce8
commit 8877202ac1
1 changed files with 7 additions and 4 deletions

View File

@ -170,14 +170,17 @@ def locatePost(baseDir: str,nickname: str,domain: str,postUrl: str,replies=False
# if this post in the shared inbox?
handle='inbox@'+domain
boxName='inbox'
postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl.replace('/','#')+'.'+extension
postUrl=postUrl.replace('/','#')
postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl+'.'+extension
if not os.path.isfile(postFilename):
boxName='outbox'
postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl.replace('/','#')+'.'+extension
postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl+'.'+extension
if not os.path.isfile(postFilename):
# if this post in the inbox of the person?
boxName='inbox'
postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl.replace('/','#')+'.'+extension
postFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxName+'/'+postUrl+'.'+extension
if not os.path.isfile(postFilename):
postFilename=baseDir+'/cache/announce/'+nickname+'/'+postUrl+'.'+extension
if not os.path.isfile(postFilename):
postFilename=None
return postFilename