Fixed example Echobot
This commit is contained in:
@@ -5,8 +5,8 @@ from fbchat import log, Client
|
|||||||
# Subclass fbchat.Client and override required methods
|
# Subclass fbchat.Client and override required methods
|
||||||
class EchoBot(Client):
|
class EchoBot(Client):
|
||||||
def onMessage(self, author_id, message_object, thread_id, thread_type, **kwargs):
|
def onMessage(self, author_id, message_object, thread_id, thread_type, **kwargs):
|
||||||
self.markAsDelivered(author_id, thread_id)
|
self.markAsDelivered(thread_id, message_object.uid)
|
||||||
self.markAsRead(author_id)
|
self.markAsRead(thread_id)
|
||||||
|
|
||||||
log.info("{} from {} in {}".format(message_object, thread_id, thread_type.name))
|
log.info("{} from {} in {}".format(message_object, thread_id, thread_type.name))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user