buffer: Clear the buffer last message if we succeed in sending it.
This commit is contained in:
parent
7ad0893a3f
commit
b2877b0f71
1 changed files with 2 additions and 0 deletions
|
@ -105,6 +105,7 @@ def room_buffer_input_cb(server_name, buffer, input_data):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
server.room_send_message(room_buffer, formatted_data, "m.text")
|
server.room_send_message(room_buffer, formatted_data, "m.text")
|
||||||
|
room_buffer.last_message = None
|
||||||
except OlmTrustError as e:
|
except OlmTrustError as e:
|
||||||
if (G.CONFIG.network.resending_ignores_devices
|
if (G.CONFIG.network.resending_ignores_devices
|
||||||
and room_buffer.last_message):
|
and room_buffer.last_message):
|
||||||
|
@ -114,6 +115,7 @@ def room_buffer_input_cb(server_name, buffer, input_data):
|
||||||
formatted_data.to_weechat()):
|
formatted_data.to_weechat()):
|
||||||
server.room_send_message(room_buffer, formatted_data, "m.text",
|
server.room_send_message(room_buffer, formatted_data, "m.text",
|
||||||
ignore_unverified_devices=True)
|
ignore_unverified_devices=True)
|
||||||
|
room_buffer.last_message = None
|
||||||
else:
|
else:
|
||||||
# If the item is a normal user message store it in the
|
# If the item is a normal user message store it in the
|
||||||
# buffer to enable the send-anyways functionality.
|
# buffer to enable the send-anyways functionality.
|
||||||
|
|
Loading…
Add table
Reference in a new issue