Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norstbox
gajim
Commits
1bc78a38
Commit
1bc78a38
authored
Apr 06, 2006
by
Yann Leboulanger
Browse files
we remove agent even if it doesn't reply. Fixes
#1756
parent
29f41b22
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/common/connection.py
View file @
1bc78a38
...
...
@@ -717,16 +717,14 @@ class Connection(ConnectionHandlers):
if
iq_obj
.
getTag
(
'error'
):
# error, probably not a real agent
return
self
.
connection
.
getRoster
().
delItem
(
agent
)
def
unsubscribe_agent
(
self
,
agent
):
if
not
self
.
connection
:
return
iq
=
common
.
xmpp
.
Iq
(
'set'
,
common
.
xmpp
.
NS_REGISTER
,
to
=
agent
)
iq
.
getTag
(
'query'
).
setTag
(
'remove'
)
self
.
connection
.
SendAndCallForResponse
(
iq
,
self
.
_continue_unsubscribe
,
{
'agent'
:
agent
})
return
self
.
connection
.
send
(
iq
)
self
.
connection
.
getRoster
().
delItem
(
agent
)
def
update_contact
(
self
,
jid
,
name
,
groups
):
'''update roster item on jabber server'''
...
...
src/gajim.py
View file @
1bc78a38
...
...
@@ -965,6 +965,8 @@ class Interface:
#FIXME if it was the only one in its group, remove the group
return
elif
not
contacts
:
if
sub
==
'remove'
:
return
# Add it to roster
contact
=
gajim
.
contacts
.
create_contact
(
jid
=
jid
,
name
=
name
,
groups
=
groups
,
show
=
'offline'
,
sub
=
sub
,
ask
=
ask
)
...
...
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