Profile updates

master
Bob Mottram 2019-08-22 18:25:12 +01:00
parent 323fec6794
commit 5891f2ae12
1 changed files with 10 additions and 9 deletions

View File

@ -645,19 +645,20 @@ def receiveUpdate(session,baseDir: str, \
if debug: if debug:
print('DEBUG: "users" missing from actor in '+messageJson['type']) print('DEBUG: "users" missing from actor in '+messageJson['type'])
return False return False
if messageJson['object']['type']=='Person':
if messageJson['object'].get('url') and messageJson['object'].get('id'):
if personReceiveUpdate(baseDir,nickname,domain,port, \
messageJson['object'], \
personCache,debug):
if debug:
print('DEBUG: Profile update was received for '+messageJson['object']['url'])
return True
if messageJson['object'].get('capability') and messageJson['object'].get('scope'): if messageJson['object'].get('capability') and messageJson['object'].get('scope'):
domain,tempPort=getDomainFromActor(messageJson['object']['scope']) domain,tempPort=getDomainFromActor(messageJson['object']['scope'])
nickname=getNicknameFromActor(messageJson['object']['scope']) nickname=getNicknameFromActor(messageJson['object']['scope'])
if messageJson['object']['type']=='Person':
if messageJson['object'].get('url') and messageJson['object'].get('id'):
if personReceiveUpdate(baseDir,nickname,domain,port, \
messageJson['object'], \
personCache,debug):
if debug:
print('DEBUG: An update was received for '+messageJson['object']['url'])
return True
if messageJson['object']['type']=='Capability': if messageJson['object']['type']=='Capability':
if capabilitiesReceiveUpdate(baseDir,nickname,domain,port, if capabilitiesReceiveUpdate(baseDir,nickname,domain,port,
messageJson['actor'], \ messageJson['actor'], \