plugin XEP-0085: fixed chatstate blinking following 0632d96f08ad change
This commit is contained in:
parent
76a0afedf1
commit
04929c74d4
1 changed files with 5 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ except ImportError:
|
|||
from wokkel.subprotocols import XMPPHandler
|
||||
from twisted.words.xish import domish
|
||||
from twisted.internet import reactor
|
||||
from twisted.internet import error as internet_error
|
||||
|
||||
NS_XMPP_CLIENT = "jabber:client"
|
||||
NS_CHAT_STATES = "http://jabber.org/protocol/chatstates"
|
||||
|
|
@ -372,6 +373,10 @@ class ChatStateMachine(object):
|
|||
client.xmlstream.send(mess_data['xml'])
|
||||
|
||||
self.state = state
|
||||
try:
|
||||
self.timer.cancel()
|
||||
except (internet_error.AlreadyCalled, AttributeError):
|
||||
pass
|
||||
|
||||
if transition["next_state"] and transition["delay"] > 0:
|
||||
self.timer = reactor.callLater(transition["delay"], self._onEvent, transition["next_state"])
|
||||
|
|
|
|||
Loading…
Reference in a new issue