Skip to content

Commit

Permalink
Display messages coming from room jids
Browse files Browse the repository at this point in the history
And classify them as status messages.

Although underspecced, this is used in the wild.
  • Loading branch information
lissine0 authored and tmolitor-stud-tu committed Oct 15, 2024
1 parent 80df783 commit 395dfd0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Monal/Classes/MLMessageProcessor.m
Original file line number Diff line number Diff line change
Expand Up @@ -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:@"/<type=groupchat>"] && !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"])
{
Expand Down Expand Up @@ -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:@"/<type=groupchat>"] && !messageNode.fromResource)
messageType = kMessageTypeStatus;
DDLogInfo(@"Got message of type: %@", messageType);

if(body)
Expand Down

0 comments on commit 395dfd0

Please sign in to comment.