Skip to content

Commit

Permalink
Make the discovery of jid type more reliable for MUCs
Browse files Browse the repository at this point in the history
XEP-0045 requires a room to
- have an identity with category='conference'
- advertise support for the 'http://jabber.org/protocol/muc' feature

Thus it is more reliable to check for both of these things.
  • Loading branch information
lissine0 authored and tmolitor-stud-tu committed Oct 15, 2024
1 parent 85595ec commit 80df783
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Monal/Classes/xmpp.m
Original file line number Diff line number Diff line change
Expand Up @@ -4485,7 +4485,8 @@ -(AnyPromise*) checkJidType:(NSString*) jid
//the "account" jidType makes it possible to add the component as a contact.
if([identities containsObject:@"account"])
return resolve(@"account");
else if([features containsObject:@"http://jabber.org/protocol/muc"])
else if([identities containsObject:@"conference"]
&& [features containsObject:@"http://jabber.org/protocol/muc"])
return resolve(@"muc");
else
return resolve(@"account");
Expand Down

0 comments on commit 80df783

Please sign in to comment.