Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
gajim
gajim
Commits
93af68f8
Commit
93af68f8
authored
Apr 14, 2018
by
Philipp Hörist
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dont show error when receiving invalid avatars
Fixes
#9022
parent
9f0eaf9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
gajim/common/pep.py
gajim/common/pep.py
+5
-1
No files found.
gajim/common/pep.py
View file @
93af68f8
...
...
@@ -483,6 +483,10 @@ class AvatarNotificationPEP(AbstractPEP):
def
_extract_info
(
self
,
items
):
self
.
avatar
=
None
for
item
in
items
.
getTags
(
'item'
):
metadata
=
item
.
getTag
(
'metadata'
)
if
metadata
is
None
:
app
.
log
(
'avatar'
).
warning
(
'Invalid avatar stanza:
\n
%s'
,
items
)
break
info
=
item
.
getTag
(
'metadata'
).
getTag
(
'info'
)
if
info
is
not
None
:
self
.
avatar
=
info
.
getAttrs
()
...
...
@@ -494,7 +498,7 @@ def _on_receive(self, jid, account):
con
=
app
.
connections
[
account
]
if
self
.
avatar
is
None
:
# Remove avatar
app
.
log
(
'avatar'
).
debug
(
'Remove (Pubsub): %s'
,
jid
)
app
.
log
(
'avatar'
).
info
(
'Remove (Pubsub): %s'
,
jid
)
app
.
contacts
.
set_avatar
(
account
,
jid
,
None
)
own_jid
=
con
.
get_own_jid
().
getStripped
()
app
.
logger
.
set_avatar_sha
(
own_jid
,
jid
,
None
)
...
...
Markus Wintermann
@troom
mentioned in issue
#9074 (closed)
·
Apr 14, 2018
mentioned in issue
#9074 (closed)
mentioned in issue #9074
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment