From 49d087a9110e4ba172868fa417b7933a57be2b26 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 22 Aug 2019 18:33:04 +0100 Subject: [PATCH] Store updated profile in memory cache --- inbox.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inbox.py b/inbox.py index 7726c5a7a..8b7f1556c 100644 --- a/inbox.py +++ b/inbox.py @@ -609,7 +609,7 @@ def personReceiveUpdate(baseDir: str,nickname: str,domain: str,port: int, \ print('WARN: Public key does not match cached actor when updating') return False # save to cache in memory - personCache[personJson['id']]=personJson + storePersonInCache(baseDir,personJson['id'],personJson,personCache) # save to cache on file with open(actorFilename, 'w') as fp: commentjson.dump(personJson, fp, indent=4, sort_keys=False) @@ -648,6 +648,8 @@ def receiveUpdate(session,baseDir: str, \ if messageJson['object']['type']=='Person': if messageJson['object'].get('url') and messageJson['object'].get('id'): + domain,tempPort=getDomainFromActor(messageJson['actor']) + nickname=getNicknameFromActor(messageJson['actor']) if personReceiveUpdate(baseDir,nickname,domain,port, \ messageJson['object'], \ personCache,debug):