From b2877b0f71ef9b6db603e584a5624892e4fc8d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 27 Jun 2019 11:48:01 +0200 Subject: [PATCH] buffer: Clear the buffer last message if we succeed in sending it. --- matrix/buffer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matrix/buffer.py b/matrix/buffer.py index 5de6108..68a39d5 100644 --- a/matrix/buffer.py +++ b/matrix/buffer.py @@ -105,6 +105,7 @@ def room_buffer_input_cb(server_name, buffer, input_data): try: server.room_send_message(room_buffer, formatted_data, "m.text") + room_buffer.last_message = None except OlmTrustError as e: if (G.CONFIG.network.resending_ignores_devices and room_buffer.last_message): @@ -114,6 +115,7 @@ def room_buffer_input_cb(server_name, buffer, input_data): formatted_data.to_weechat()): server.room_send_message(room_buffer, formatted_data, "m.text", ignore_unverified_devices=True) + room_buffer.last_message = None else: # If the item is a normal user message store it in the # buffer to enable the send-anyways functionality.