Add Session.user in favor of Session.user_id
This commit is contained in:
@@ -8,7 +8,7 @@ listener = fbchat.Listener.connect(session, chat_on=False, foreground=False)
|
||||
def on_message(event):
|
||||
print(f"{event.message.text} from {event.author.id} in {event.thread.id}")
|
||||
# If you're not the author, echo
|
||||
if event.author.id != session.user_id:
|
||||
if event.author.id != session.user.id:
|
||||
event.thread.send_text(event.message.text)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user