Removed some unneeded code
This commit is contained in:
parent
feb3215745
commit
7ba24f7a54
@ -13,9 +13,7 @@ class worker(threading.Thread):
|
|||||||
self.longpoll = VkLongPoll(self.session.vk.session_object)
|
self.longpoll = VkLongPoll(self.session.vk.session_object)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
print("starting events")
|
|
||||||
for event in self.longpoll.listen():
|
for event in self.longpoll.listen():
|
||||||
print(event)
|
|
||||||
if event.type == VkEventType.MESSAGE_NEW:
|
if event.type == VkEventType.MESSAGE_NEW:
|
||||||
pub.sendMessage("order-sent-message", obj=event)
|
pub.sendMessage("order-sent-message", obj=event)
|
||||||
elif event.type == VkEventType.USER_ONLINE:
|
elif event.type == VkEventType.USER_ONLINE:
|
||||||
|
@ -371,8 +371,7 @@ class Controller(object):
|
|||||||
|
|
||||||
def get_chat(self, obj=None):
|
def get_chat(self, obj=None):
|
||||||
""" Searches or creates a chat buffer with the id of the user that is sending or receiving a message.
|
""" Searches or creates a chat buffer with the id of the user that is sending or receiving a message.
|
||||||
obj mysc.longpoll.event: an event wich defines some data from the vk's long poll server."""
|
obj vk_api.longpoll.EventType: an event wich defines some data from the vk's long poll server."""
|
||||||
print obj
|
|
||||||
if obj.to_me:
|
if obj.to_me:
|
||||||
buffer = self.search_chat_buffer(obj.user_id)
|
buffer = self.search_chat_buffer(obj.user_id)
|
||||||
uid = obj.user_id
|
uid = obj.user_id
|
||||||
|
Loading…
Reference in New Issue
Block a user