forked from indymedia/epicyon
Reduce indentation
parent
3fc0a69e3f
commit
c36a8a0401
13
inbox.py
13
inbox.py
|
@ -178,13 +178,14 @@ def inboxPermittedMessage(domain: str,messageJson: {},federationList: []) -> boo
|
||||||
|
|
||||||
alwaysAllowedTypes=('Follow','Like','Delete','Announce')
|
alwaysAllowedTypes=('Follow','Like','Delete','Announce')
|
||||||
if messageJson['type'] not in alwaysAllowedTypes:
|
if messageJson['type'] not in alwaysAllowedTypes:
|
||||||
if messageJson.get('object'):
|
if not messageJson.get('object'):
|
||||||
if not isinstance(messageJson['object'], dict):
|
return True
|
||||||
|
if not isinstance(messageJson['object'], dict):
|
||||||
|
return False
|
||||||
|
if messageJson['object'].get('inReplyTo'):
|
||||||
|
inReplyTo=messageJson['object']['inReplyTo']
|
||||||
|
if not urlPermitted(inReplyTo,federationList,"inbox:write"):
|
||||||
return False
|
return False
|
||||||
if messageJson['object'].get('inReplyTo'):
|
|
||||||
inReplyTo=messageJson['object']['inReplyTo']
|
|
||||||
if not urlPermitted(inReplyTo,federationList,"inbox:write"):
|
|
||||||
return False
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue