From 977e5395e5e94c2ac25f27eae6ffd807174237d8 Mon Sep 17 00:00:00 2001 From: lissine Date: Fri, 23 Aug 2024 10:42:40 +0100 Subject: [PATCH] Improve the discovery of room names 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 --- Monal/Classes/MLMucProcessor.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Monal/Classes/MLMucProcessor.m b/Monal/Classes/MLMucProcessor.m index 0235708d84..54faa8388c 100644 --- a/Monal/Classes/MLMucProcessor.m +++ b/Monal/Classes/MLMucProcessor.m @@ -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/