main
Bob Mottram 2019-12-17 15:04:45 +00:00
parent 5b1479a425
commit 044d7f9cbe
1 changed files with 6 additions and 4 deletions

10
xmpp.py
View File

@ -16,8 +16,9 @@ def getXmppAddress(actorJson: {}) -> str:
for propertyValue in actorJson['attachment']: for propertyValue in actorJson['attachment']:
if not propertyValue.get('name'): if not propertyValue.get('name'):
continue continue
if not (propertyValue['name'].lower().startswith('xmpp') or \ nameLower=propertyValue['name'].lower()
propertyValue['name'].lower().startswith('jabber')): if not (nameLower.startswith('xmpp') or \
nameLower.startswith('jabber')):
continue continue
if not propertyValue.get('type'): if not propertyValue.get('type'):
continue continue
@ -50,8 +51,9 @@ def setXmppAddress(actorJson: {},xmppAddress: str) -> None:
continue continue
if not propertyValue.get('type'): if not propertyValue.get('type'):
continue continue
if not (propertyValue['name'].lower().startswith('xmpp') or \ nameLower=propertyValue['name'].lower()
propertyValue['name'].lower().startswith('jabber')): if not (nameLower.startswith('xmpp') or \
nameLower.startswith('jabber')):
continue continue
if propertyValue['type']!='PropertyValue': if propertyValue['type']!='PropertyValue':
continue continue