Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mrDoctorWho/vk4xmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Smith <mrdoctorwho@gmail.com>2017-04-28 11:59:49 +0300
committerJohn Smith <mrdoctorwho@gmail.com>2017-04-28 11:59:49 +0300
commitea7280eb73d1b31848d90482bced61c5af36a056 (patch)
treed2ad803099d2ba841b8a970248ea1236e2264265 /library
parent4eac76421c26e4797135344ab72432b73c994b56 (diff)
Remove user id from typing users when user receivies a message from them (fixes #172)
Diffstat (limited to 'library')
-rw-r--r--library/longpoll.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/longpoll.py b/library/longpoll.py
index 9f8a6aa..c79e219 100644
--- a/library/longpoll.py
+++ b/library/longpoll.py
@@ -130,9 +130,10 @@ def processPollResult(user, data):
sendPresence(user.source, vk2xmpp(uid), "unavailable")
elif typ == TYPE_TYPING: # user is typing
- if evt[0] not in user.typing:
- sendMessage(user.source, vk2xmpp(evt[0]), typ="composing")
- user.typing[evt[0]] = time.time()
+ uid = evt[0]
+ if uid not in user.typing:
+ sendMessage(user.source, vk2xmpp(uid), typ="composing")
+ user.typing[uid] = time.time()
retcode = CODE_FINE
return retcode