Skip to content
Snippets Groups Projects
Commit e09c9362 authored by Brendan Taylor's avatar Brendan Taylor
Browse files

don't send termination unless we've sent a message

fixes #3963
parent dbcfc984
No related branches found
No related tags found
No related merge requests found
......@@ -111,8 +111,10 @@ def cancelled_negotiation(self):
self.negotiated = {}
def terminate(self):
# only send termination message if we think they might have XEP-0201 support
if self.received_thread_id or self.last_receive == 0:
# only send termination message if we've sent a message and think they
# have XEP-0201 support
if self.last_send > 0 and \
(self.received_thread_id or self.last_receive == 0):
msg = xmpp.Message()
feature = msg.NT.feature
feature.setNamespace(xmpp.NS_FEATURE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment