From 1fb731ac1cbe5e7bff6a794748ef36a3de1c3d3f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 6 Jan 2024 13:18:12 +0100 Subject: Matrix: fix matrix.to parsing room alias, show unimplemented messages as regular text message (get unread status) --- src/plugins/Matrix.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index aef65fa..06ed3a0 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -2696,7 +2696,7 @@ namespace QuickMedia { } bool message_is_timeline(Message *message) { - return message->type >= MessageType::TEXT && message->type <= MessageType::FILE; + return (message->type >= MessageType::TEXT && message->type <= MessageType::FILE) || message->type == MessageType::UNIMPLEMENTED; } void Matrix::append_system_message(RoomData *room_data, std::shared_ptr message) { @@ -3507,11 +3507,13 @@ namespace QuickMedia { // Parse local part for(; index < size; ++index) { char c = str[index]; - if((c >= 'a' && c <= 'z') || c == '-' || c == '.' || c == '=' || c == '_' || c == '/') { + if((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' || c == '.' || c == '=' || c == '_') { } else if(c == ':') { found_colon = true; break; + } else { + return {}; } } -- cgit v1.2.3