Added handling of 'user is typing' event

This commit is contained in:
Manuel Cortez 2019-01-13 12:37:19 -06:00
parent ba40b74230
commit 43b762dd2a
2 changed files with 2 additions and 2 deletions

View File

@ -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):

View File

@ -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")