buffer: Make the resending -> ignore devices logic a configurable option.

This commit is contained in:
Damir Jelić 2019-06-26 23:07:08 +02:00
parent 563cf9926c
commit 7ad0893a3f
2 changed files with 16 additions and 1 deletions

View file

@ -106,7 +106,8 @@ def room_buffer_input_cb(server_name, buffer, input_data):
try:
server.room_send_message(room_buffer, formatted_data, "m.text")
except OlmTrustError as e:
if True and room_buffer.last_message:
if (G.CONFIG.network.resending_ignores_devices
and room_buffer.last_message):
room_buffer.error("Ignoring unverified devices.")
if (room_buffer.last_message.to_weechat() ==

View file

@ -675,6 +675,20 @@ class MatrixConfig(WeechatConfig):
"the markers_enabled variable can be manipulated with the "
"/room command, see /help room"),
),
Option(
"resending_ignores_devices",
"boolean",
"",
0,
0,
"on",
("If on resending the same message to a room that contains "
"unverified devices will mark the devices as ignored and "
"continue sending the message. If off resending the message "
"will again fail and devices need to be marked as verified "
"one by one or the /send-anyways command needs to be used to "
"ignore them."),
),
]
color_options = [