From b9cd9a66396f272216ef52feabe7a43366bd3d89 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Tue, 2 Jan 2018 09:56:37 +0100 Subject: [PATCH] fix get_dialogs() return type in example Catching up with 238198db where get_dialogs return type was changed. --- telethon_examples/interactive_telegram_client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/telethon_examples/interactive_telegram_client.py b/telethon_examples/interactive_telegram_client.py index 52c2c356..501d557b 100644 --- a/telethon_examples/interactive_telegram_client.py +++ b/telethon_examples/interactive_telegram_client.py @@ -138,15 +138,15 @@ class InteractiveTelegramClient(TelegramClient): # Entities represent the user, chat or channel # corresponding to the dialog on the same index. - dialogs, entities = self.get_dialogs(limit=dialog_count) + dialogs = self.get_dialogs(limit=dialog_count) i = None while i is None: print_title('Dialogs window') # Display them so the user can choose - for i, entity in enumerate(entities, start=1): - sprint('{}. {}'.format(i, get_display_name(entity))) + for i, dialog in enumerate(dialogs, start=1): + sprint('{}. {}'.format(i, get_display_name(dialog.entity))) # Let the user decide who they want to talk to print() @@ -177,7 +177,7 @@ class InteractiveTelegramClient(TelegramClient): i = None # Retrieve the selected user (or chat, or channel) - entity = entities[i] + entity = dialogs[i].entity # Show some information print_title('Chat with "{}"'.format(get_display_name(entity)))