From f045e579e1faa186ca0ebf6e6d1e562fbcd75727 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 27 Apr 2021 22:33:40 +0200 Subject: Fix multiline block not visible if only one line, fix naughty users having too long names or newlines in username --- plugins/Matrix.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index f76d70d..1063e0e 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -14,8 +14,11 @@ namespace QuickMedia { struct RoomData; struct Message; + static const int AUTHOR_MAX_LENGTH = 48; + std::string remove_reply_formatting(const std::string &str); std::string message_get_body_remove_formatting(Message *message); + std::string extract_first_line_remove_newline_elipses(const std::string &str, size_t max_length); enum class UserResolveState { NOT_RESOLVED, -- cgit v1.2.3