Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
208
Issues
208
List
Boards
Labels
Service Desk
Milestones
Merge Requests
21
Merge Requests
21
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim
Commits
bbc038ec
Commit
bbc038ec
authored
Dec 03, 2018
by
Philipp Hörist
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle presence without from attr correctly
Fixes #9472
parent
f8047c63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
gajim/common/modules/caps.py
gajim/common/modules/caps.py
+9
-2
gajim/common/modules/chatstates.py
gajim/common/modules/chatstates.py
+2
-2
gajim/common/modules/vcard_avatars.py
gajim/common/modules/vcard_avatars.py
+5
-2
No files found.
gajim/common/modules/caps.py
View file @
bbc038ec
...
...
@@ -42,6 +42,15 @@ def __init__(self, con):
self
.
_create_suitable_client_caps
=
caps_cache
.
create_suitable_client_caps
def
_presence_received
(
self
,
_con
,
stanza
):
if
stanza
.
getType
()
in
(
'unavailable'
,
'error'
):
return
from_
=
stanza
.
getFrom
()
if
from_
is
None
:
# Presence from ourself
return
full_jid
=
str
(
from_
)
hash_method
=
node
=
caps_hash
=
None
caps
=
stanza
.
getTag
(
'c'
,
namespace
=
nbxmpp
.
NS_CAPS
)
...
...
@@ -50,8 +59,6 @@ def _presence_received(self, _con, stanza):
node
=
caps
[
'node'
]
caps_hash
=
caps
[
'ver'
]
from_
=
stanza
.
getFrom
()
full_jid
=
str
(
from_
)
show
=
parse_show
(
stanza
)
type_
=
parse_type
(
stanza
)
...
...
gajim/common/modules/chatstates.py
View file @
bbc038ec
...
...
@@ -74,8 +74,8 @@ def _presence_received(self,
return
full_jid
=
stanza
.
getFrom
()
if
self
.
_con
.
get_own_jid
().
bareMatch
(
full_jid
):
if
full_jid
is
None
or
self
.
_con
.
get_own_jid
().
bareMatch
(
full_jid
):
# Presence from ourself
return
contact
=
app
.
contacts
.
get_gc_contact
(
...
...
gajim/common/modules/vcard_avatars.py
View file @
bbc038ec
...
...
@@ -51,12 +51,15 @@ def _find_own_avatar(self):
app
.
config
.
set_per
(
'accounts'
,
self
.
_account
,
'avatar_sha'
,
''
)
def
_presence_received
(
self
,
_con
,
stanza
):
update
=
stanza
.
getTag
(
'x'
,
namespace
=
nbxmpp
.
NS_VCARD_UPDATE
)
if
update
is
None
:
if
stanza
.
getType
()
in
(
'unavailable'
,
'error'
):
return
jid
=
stanza
.
getFrom
()
update
=
stanza
.
getTag
(
'x'
,
namespace
=
nbxmpp
.
NS_VCARD_UPDATE
)
if
update
is
None
:
return
avatar_sha
=
update
.
getTagData
(
'photo'
)
if
avatar_sha
is
None
:
log
.
info
(
'%s is not ready to promote an avatar'
,
jid
)
...
...
Nikolay Nehajchik
@nehajkol
·
Dec 04, 2018
how to solve this problem in windows?
how to solve this problem in windows?
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