main2
Bob Mottram 2019-11-04 12:46:51 +00:00
parent 409bc2103b
commit 45a2844855
1 changed files with 6 additions and 9 deletions

View File

@ -756,14 +756,12 @@ def postIsAddressedToFollowers(baseDir: str,
ccList=[]
if postJsonObject['type']!='Update' and \
isinstance(postJsonObject['object'], dict):
if not postJsonObject['object'].get('to'):
return False
if postJsonObject['object'].get('to'):
toList=postJsonObject['object']['to']
if postJsonObject['object'].get('cc'):
ccList=postJsonObject['object']['cc']
else:
if not postJsonObject.get('to'):
return False
if postJsonObject.get('to'):
toList=postJsonObject['to']
if postJsonObject.get('cc'):
ccList=postJsonObject['cc']
@ -774,8 +772,7 @@ def postIsAddressedToFollowers(baseDir: str,
addressedToFollowers=False
if followersUrl in toList:
addressedToFollowers=True
if not addressedToFollowers:
if followersUrl in ccList:
elif followersUrl in ccList:
addressedToFollowers=True
return addressedToFollowers