summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-11-05 20:57:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-11-05 20:57:35 +0300
commit1c5692ba09e1917794d8cf1308f3c009073d4be8 (patch)
tree2cb9ec6681aa06f914d27cb85a327f4fd1cf0c7f /protocols
parent4d6fa4f3f9fe692486a1e35cfe85a14ddac79d51 (diff)
fixes #2113 (Jabber: при изменении статуса участника конфы в лог пишется некорректный статус)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp2
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp5
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) {