Added handling of 'user is typing' event
This commit is contained in:
parent
ba40b74230
commit
43b762dd2a
@ -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):
|
||||
|
@ -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")
|
Loading…
Reference in New Issue
Block a user