merge-requests/6/head
Bob Mottram 2020-02-04 19:20:16 +00:00
parent dafbcf08a1
commit a5251ba561
1 changed files with 3 additions and 9 deletions

View File

@ -775,17 +775,11 @@ def personReceiveUpdate(baseDir: str, \
# remove avatar if it exists so that it will be refreshed later
# when a timeline is constructed
actorStr=personJson['id'].replace('/','-')
avatarFilename=baseDir+'/cache/avatars/'+actorStr+'.png'
if os.path.isfile(avatarFilename):
os.remove(avatarFilename)
else:
avatarFilename=baseDir+'/cache/avatars/'+actorStr+'.jpg'
avatarFilenameExtensions=('png','jpg','gif','webp')
for extension in avatarFilenameExtensions:
avatarFilename=baseDir+'/cache/avatars/'+actorStr+'.'+extension
if os.path.isfile(avatarFilename):
os.remove(avatarFilename)
else:
avatarFilename=baseDir+'/cache/avatars/'+actorStr+'.gif'
if os.path.isfile(avatarFilename):
os.remove(avatarFilename)
return True
def receiveUpdateToQuestion(recentPostsCache: {},messageJson: {}, \