If there are only a few inbox posts addressed to followers then move them to the individual addresses dict

We can afford to do a few extra copies, but not hundreds or thousands
master
Bob Mottram 2019-07-10 17:20:29 +01:00
parent 3396cb7c19
commit dec94017ef
1 changed files with 12 additions and 1 deletions

View File

@ -564,7 +564,18 @@ def runInboxQueue(baseDir: str,httpPrefix: str,sendThreads: [],postLog: [],cache
# get recipients list
recipientsDict,recipientsDictFollowers= \
inboxPostRecipients(baseDir,queueJson['post'],httpPrefix,domain,port)
recipientsList=[recipientsDict,recipientsDictFollowers]
# if there are only a small number of followers then process them as if they
# were specifically addresses to particular accounts
noOfFollowItems=len(recipientsDictFollowers.items())
if noOfFollowItems>0:
if noOfFollowItems<5:
if debug:
print('DEBUG: moving '+str(noOfFollowItems)+' inbox posts addressed to followers')
for handle,postItem in recipientsDictFollowers.items():
recipientsDict['handle']=postItem
recipientsDictFollowers={}
recipientsList=[recipientsDict,recipientsDictFollowers]
if debug:
print('*************************************')