Skip to content

Commit

Permalink
Improve the discovery of room names
Browse files Browse the repository at this point in the history
Make the discovery of a room's name more reliable by getting it from the
identity element, which MUST be returned by the MUC service, instead of relying on
muc#roomconfig_roomname, which MAY be returned.

see https://xmpp.org/extensions/xep-0045.html#disco-roominfo
  • Loading branch information
lissine0 authored and tmolitor-stud-tu committed Aug 24, 2024
1 parent 7a6ea6b commit 977e539
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Monal/Classes/MLMucProcessor.m
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ -(void) publishAvatar:(UIImage* _Nullable) image forMuc:(NSString*) room
}

//extract further muc infos
NSString* mucName = [iqNode findFirst:@"{http://jabber.org/protocol/disco#info}query/\\{http://jabber.org/protocol/muc#roominfo}result@muc#roomconfig_roomname\\"];
NSString* mucName = [iqNode findFirst:@"{http://jabber.org/protocol/disco#info}query/identity@name"];
NSString* mucType = @"channel";
//both are needed for omemo, see discussion with holger 2021-01-02/03 -- Thilo Molitor
//see also: https://docs.modernxmpp.org/client/groupchat/
Expand Down

0 comments on commit 977e539

Please sign in to comment.