From 395dfd0a4fe4924bef83cd94358a47bf434fcbe3 Mon Sep 17 00:00:00 2001 From: lissine Date: Sat, 21 Sep 2024 00:39:15 +0100 Subject: [PATCH] Display messages coming from room jids And classify them as status messages. Although underspecced, this is used in the wild. --- Monal/Classes/MLMessageProcessor.m | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Monal/Classes/MLMessageProcessor.m b/Monal/Classes/MLMessageProcessor.m index f93fbfde8..1dff23a1b 100644 --- a/Monal/Classes/MLMessageProcessor.m +++ b/Monal/Classes/MLMessageProcessor.m @@ -397,13 +397,6 @@ +(MLMessage* _Nullable) processMessage:(XMPPMessage*) messageNode andOuterMessag return nil; } - //ignore all other groupchat messages coming from bare jid (e.g. not being a "normal" muc message nor a subject update handled above) - if([messageNode check:@"/"] && !messageNode.fromResource) - { - DDLogVerbose(@"Ignoring groupchat message without resource (should be already handled above)..."); - return nil; - } - NSString* decrypted; if([messageNode check:@"{eu.siacs.conversations.axolotl}encrypted/header"]) { @@ -581,6 +574,9 @@ +(MLMessage* _Nullable) processMessage:(XMPPMessage*) messageNode andOuterMessag else if([lowercaseBody hasPrefix:@"https://"]) messageType = kMessageTypeUrl; } + //messages from room jids are classified as status messages + if([messageNode check:@"/"] && !messageNode.fromResource) + messageType = kMessageTypeStatus; DDLogInfo(@"Got message of type: %@", messageType); if(body)