From 7b32f314110ff2cdb2d2ddade8e7b8ff9e5b51fb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 24 Feb 2020 13:37:47 +0300 Subject: Jabber: more strict XEP-045 compliance --- protocols/JabberG/src/jabber_groupchat.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index d8abeec340..47bd88b9b7 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -255,11 +255,10 @@ void CJabberProto::GroupchatJoinRoom(const char *server, const char *room, const replaceStr(item->password, info.m_password); int status = (m_iStatus == ID_STATUS_INVISIBLE) ? ID_STATUS_ONLINE : m_iStatus; - if (mir_strlen(info.m_password)) { - XmlNode x("x"); x << XATTR("xmlns", JABBER_FEAT_MUC) << XCHILD("password", info.m_password); - SendPresenceTo(status, text, x); - } - else SendPresenceTo(status, text); + XmlNode x("x"); x << XATTR("xmlns", JABBER_FEAT_MUC); + if (mir_strlen(info.m_password)) + x << XCHILD("password", info.m_password); + SendPresenceTo(status, text, x); } //////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3