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']:
if not propertyValue.get('name'):
continue
if not (propertyValue['name'].lower().startswith('xmpp') or \
propertyValue['name'].lower().startswith('jabber')):
nameLower=propertyValue['name'].lower()
if not (nameLower.startswith('xmpp') or \
nameLower.startswith('jabber')):
continue
if not propertyValue.get('type'):
continue
@ -50,8 +51,9 @@ def setXmppAddress(actorJson: {},xmppAddress: str) -> None:
continue
if not propertyValue.get('type'):
continue
if not (propertyValue['name'].lower().startswith('xmpp') or \
propertyValue['name'].lower().startswith('jabber')):
nameLower=propertyValue['name'].lower()
if not (nameLower.startswith('xmpp') or \
nameLower.startswith('jabber')):
continue
if propertyValue['type']!='PropertyValue':
continue