aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-01-06 13:18:12 +0100
committerdec05eba <dec05eba@protonmail.com>2024-01-06 13:18:12 +0100
commit1fb731ac1cbe5e7bff6a794748ef36a3de1c3d3f (patch)
treef1a0838b26620cecbe53973e61c87c14de3162e6 /src/plugins
parentbc1f9ccded38ca1f18cd33a8fbf81a4d4cf2c2ec (diff)
Matrix: fix matrix.to parsing room alias, show unimplemented messages as regular text message (get unread status)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Matrix.cpp6
1 files changed, 4 insertions, 2 deletions
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> 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 {};
}
}