Rename .uid -> .id everywhere

This commit is contained in:
Mads Marquart
2020-01-08 23:09:51 +01:00
parent 45c0a4772d
commit a5abb05ab3
35 changed files with 171 additions and 180 deletions

View File

@@ -3,13 +3,13 @@ import fbchat
# Subclass fbchat.Client and override required methods
class EchoBot(fbchat.Client):
def on_message(self, author_id, message_object, thread_id, thread_type, **kwargs):
self.mark_as_delivered(thread_id, message_object.uid)
self.mark_as_delivered(thread_id, message_object.id)
self.mark_as_read(thread_id)
print("{} from {} in {}".format(message_object, thread_id, thread_type.name))
# If you're not the author, echo
if author_id != self.uid:
if author_id != session.user_id:
self.send(message_object, thread_id=thread_id, thread_type=thread_type)