plugin/display_corrections: prefer generator to list when looping
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
ea53698fd7
commit
01a1d4441e
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ class Plugin(BasePlugin):
|
||||||
messages = self.api.get_conversation_messages()
|
messages = self.api.get_conversation_messages()
|
||||||
if not messages:
|
if not messages:
|
||||||
return None
|
return None
|
||||||
for message in messages[::-1]:
|
for message in reversed(messages):
|
||||||
if message.old_message:
|
if message.old_message:
|
||||||
if nb == 1:
|
if nb == 1:
|
||||||
return message
|
return message
|
||||||
|
|
Loading…
Reference in a new issue