Don't add stars to mark a text as bold or italic if non-markdown mode

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2020-12-21 16:04:15 +01:00
parent 9f070f594b
commit e44998028d
2 changed files with 6 additions and 3 deletions

View File

@ -303,7 +303,9 @@ class WarningTLV(TLV):
self.message.encode("UTF-8")[:self.length]
def handle(self, squirrel: Any, sender: Any) -> None:
squirrel.add_message(f"warning: *A client warned you: {self.message}*")
squirrel.add_message(f"warning: *A client warned you: {self.message}*"
if not squirrel.squinnondation.no_markdown else
f"warning: A client warned you: {self.message}")
@staticmethod
def construct(message: str) -> "WarningTLV":