From 43b762dd2a3a03cd298fb2fff78c014bae70a470 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Sun, 13 Jan 2019 12:37:19 -0600 Subject: [PATCH] Added handling of 'user is typing' event --- src/controller/mainController.py | 2 +- src/presenters/longpollthread.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 86d3d86..1ef3235 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -401,7 +401,7 @@ class Controller(object): def user_typing(self, obj): buffer = self.search_chat_buffer(obj.user_id) if buffer != None and buffer == self.get_current_buffer(): - user = self.session.get_user_name(obj.user_id) + user = self.session.get_user(obj.user_id) output.speak(_("{user1_nom} is typing...").format(**user)) def get_chat(self, obj=None): diff --git a/src/presenters/longpollthread.py b/src/presenters/longpollthread.py index 1cc16d6..f3c9215 100644 --- a/src/presenters/longpollthread.py +++ b/src/presenters/longpollthread.py @@ -24,6 +24,6 @@ class worker(threading.Thread): elif event.type == VkEventType.USER_OFFLINE: pub.sendMessage("user-offline", event=event) elif event.type == VkEventType.USER_TYPING: - pub.sendMessage("user-typing", event=event) + pub.sendMessage("user-typing", obj=event) except: pub.sendMessage("longpoll-read-timeout") \ No newline at end of file