diff --git a/matrix/buffer.py b/matrix/buffer.py index a15b989..5de6108 100644 --- a/matrix/buffer.py +++ b/matrix/buffer.py @@ -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() == diff --git a/matrix/config.py b/matrix/config.py index f5aad44..82063d2 100644 --- a/matrix/config.py +++ b/matrix/config.py @@ -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 = [