buffer: Fix redaction type config change.

This commit is contained in:
Damir Jelić 2018-09-12 20:16:17 +02:00
parent c9ce402c2c
commit 933764bf8e

View file

@ -916,12 +916,12 @@ class RoomBuffer(object):
new_message = "" new_message = ""
if G.CONFIG.look.redaction_type == RedactType.STRIKETHROUGH: if G.CONFIG.look.redactions == RedactType.STRIKETHROUGH:
plaintext_msg = W.string_remove_color(message, "") plaintext_msg = W.string_remove_color(message, "")
new_message = string_strikethrough(plaintext_msg) new_message = string_strikethrough(plaintext_msg)
elif G.CONFIG.look.redaction_type == RedactType.NOTICE: elif G.CONFIG.look.redactions == RedactType.NOTICE:
new_message = message new_message = message
elif G.CONFIG.look.redaction_type == RedactType.DELETE: elif G.CONFIG.look.redactions == RedactType.DELETE:
pass pass
message = " ".join(s for s in [new_message, redaction_msg] if s) message = " ".join(s for s in [new_message, redaction_msg] if s)