Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
947106bb
by Philipp Hörist at 2017-11-09T20:57:03+01:00
1 changed file:
Changes:
| ... | ... | @@ -471,13 +471,18 @@ class ConnectionVcard: |
| 471 | 471 |
jid = frm_jid.getStripped()
|
| 472 | 472 |
|
| 473 | 473 |
stanza_error = stanza.getError()
|
| 474 |
- if stanza_error in ('service-unavailable', 'item-not-found'):
|
|
| 474 |
+ if stanza_error in ('service-unavailable', 'item-not-found',
|
|
| 475 |
+ 'not-allowed'):
|
|
| 475 | 476 |
app.log('avatar').info('vCard not available: %s %s',
|
| 476 |
- jid, stanza_error)
|
|
| 477 |
+ frm_jid, stanza_error)
|
|
| 477 | 478 |
return
|
| 478 | 479 |
|
| 479 |
- vcard = self._node_to_dict(
|
|
| 480 |
- stanza.getTag('vCard', namespace=nbxmpp.NS_VCARD))
|
|
| 480 |
+ vcard_node = stanza.getTag('vCard', namespace=nbxmpp.NS_VCARD)
|
|
| 481 |
+ if vcard_node is None:
|
|
| 482 |
+ app.log('avatar').info('vCard not available: %s', frm_jid)
|
|
| 483 |
+ app.log('avatar').debug(stanza)
|
|
| 484 |
+ return
|
|
| 485 |
+ vcard = self._node_to_dict(vcard_node)
|
|
| 481 | 486 |
|
| 482 | 487 |
if self.get_own_jid().bareMatch(jid):
|
| 483 | 488 |
if 'NICKNAME' in vcard:
|