mirror of https://gitlab.com/bashrc2/epicyon
More checking for actor updates
parent
d53bf9a5f7
commit
90417b5f8e
13
outbox.py
13
outbox.py
|
@ -62,7 +62,10 @@ def _outboxPersonReceiveUpdate(recentPostsCache: {},
|
||||||
|
|
||||||
if not messageJson.get('type'):
|
if not messageJson.get('type'):
|
||||||
return
|
return
|
||||||
print("messageJson['type'] " + messageJson['type'])
|
if not isinstance(messageJson['type'], str):
|
||||||
|
if debug:
|
||||||
|
print('DEBUG: c2s actor update type is not a string')
|
||||||
|
return
|
||||||
if messageJson['type'] != 'Update':
|
if messageJson['type'] != 'Update':
|
||||||
return
|
return
|
||||||
if not hasObjectDict(messageJson):
|
if not hasObjectDict(messageJson):
|
||||||
|
@ -73,6 +76,10 @@ def _outboxPersonReceiveUpdate(recentPostsCache: {},
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: c2s actor update - no type')
|
print('DEBUG: c2s actor update - no type')
|
||||||
return
|
return
|
||||||
|
if not isinstance(messageJson['object']['type'], str):
|
||||||
|
if debug:
|
||||||
|
print('DEBUG: c2s actor update object type is not a string')
|
||||||
|
return
|
||||||
if messageJson['object']['type'] != 'Person':
|
if messageJson['object']['type'] != 'Person':
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: not a c2s actor update')
|
print('DEBUG: not a c2s actor update')
|
||||||
|
@ -89,6 +96,10 @@ def _outboxPersonReceiveUpdate(recentPostsCache: {},
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: c2s actor update has no id field')
|
print('DEBUG: c2s actor update has no id field')
|
||||||
return
|
return
|
||||||
|
if not isinstance(messageJson['id'], str):
|
||||||
|
if debug:
|
||||||
|
print('DEBUG: c2s actor update id is not a string')
|
||||||
|
return
|
||||||
actor = \
|
actor = \
|
||||||
httpPrefix + '://' + getFullDomain(domain, port) + '/users/' + nickname
|
httpPrefix + '://' + getFullDomain(domain, port) + '/users/' + nickname
|
||||||
if len(messageJson['to']) != 1:
|
if len(messageJson['to']) != 1:
|
||||||
|
|
Loading…
Reference in New Issue