plugin/display_corrections: prefer generator to list when looping

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent ea53698f
......@@ -43,7 +43,7 @@ class Plugin(BasePlugin):
messages = self.api.get_conversation_messages()
if not messages:
return None
for message in messages[::-1]:
for message in reversed(messages):
if message.old_message:
if nb == 1:
return message
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment