From 4e2aeceeec8bcdbaa5f0a4b97ecd4ec16a5e52ce Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 30 Nov 2022 22:38:25 +0000 Subject: [PATCH] Do not reverse the list of fresh messages Both reversed and original order do not make much sense for the bot. Ideally bots should have their own key to get the list of fresh messages in the order of IDs. --- deltachat-rpc-client/examples/echobot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deltachat-rpc-client/examples/echobot.py b/deltachat-rpc-client/examples/echobot.py index a55ca91a4..6c31d5d4d 100755 --- a/deltachat-rpc-client/examples/echobot.py +++ b/deltachat-rpc-client/examples/echobot.py @@ -32,7 +32,7 @@ async def main(): message.get_snapshot() for message in fresh_messages ] fresh_message_snapshots = await asyncio.gather(*fresh_message_snapshot_tasks) - for snapshot in reversed(fresh_message_snapshots): + for snapshot in fresh_message_snapshots: if not snapshot.is_info: await snapshot.chat.send_text(snapshot.text) await snapshot.message.mark_seen()