From 1c5692ba09e1917794d8cf1308f3c009073d4be8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 5 Nov 2019 20:57:35 +0300 Subject: =?UTF-8?q?fixes=20#2113=20(Jabber:=20=D0=BF=D1=80=D0=B8=20=D0=B8?= =?UTF-8?q?=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=82=D1=83=D1=81=D0=B0=20=D1=83=D1=87=D0=B0=D1=81=D1=82?= =?UTF-8?q?=D0=BD=D0=B8=D0=BA=D0=B0=20=D0=BA=D0=BE=D0=BD=D1=84=D1=8B=20?= =?UTF-8?q?=D0=B2=20=D0=BB=D0=BE=D0=B3=20=D0=BF=D0=B8=D1=88=D0=B5=D1=82?= =?UTF-8?q?=D1=81=D1=8F=20=D0=BD=D0=B5=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=BD=D1=8B=D0=B9=20=D1=81=D1=82=D0=B0=D1=82=D1=83=D1=81?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/JabberG/src/jabber_chat.cpp | 2 +- protocols/JabberG/src/jabber_groupchat.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index ea858072a7..8acda4ce0c 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -97,7 +97,7 @@ static TRoleOrAffiliationInfo sttRoleItems[] = ///////////////////////////////////////////////////////////////////////////////////////// // JabberGcInit - initializes the new chat -static const char *sttStatuses[] = { LPGEN("Owners"), LPGEN("Moderators"), LPGEN("Participants"), LPGEN("Visitors") }; +static const char *sttStatuses[] = { LPGEN("Visitors"), LPGEN("Participants"), LPGEN("Moderators"), LPGEN("Owners") };; int JabberGcGetStatus(JABBER_GC_AFFILIATION a, JABBER_GC_ROLE r) { diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 020e8b5e18..884561d0ec 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -882,9 +882,10 @@ void CJabberProto::GroupchatProcessPresence(const TiXmlElement *node) else role = ROLE_NONE; } - if ((role != ROLE_NONE) && (JabberGcGetStatus(r) != JabberGcGetStatus(affiliation, role))) { + if (r->m_role != ROLE_NONE && JabberGcGetStatus(r) != JabberGcGetStatus(affiliation, role)) { GcLogUpdateMemberStatus(item, resource, nick, nullptr, GC_EVENT_REMOVESTATUS, nullptr); - if (!newRes) newRes = GC_EVENT_ADDSTATUS; + if (!newRes) + newRes = GC_EVENT_ADDSTATUS; } if (affiliation != r->m_affiliation) { -- cgit v1.2.3