From 9536e0bb47b12ea2ae01ab070dd9f6aa5bb360c2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Dec 2023 17:03:21 +0300 Subject: =?UTF-8?q?fixes=20#4085=20(=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=BD=D0=B5=D0=B2=D0=B8=D0=B4=D0=B8=D0=BC=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Gadu-Gadu/src/core.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'protocols/Gadu-Gadu/src/core.cpp') diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index b7c506df0b..dd2271de69 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -1350,12 +1350,10 @@ void GaduProto::notifyuser(MCONTACT hContact, int refresh) if (!hContact) return; - if (isonline() && (uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0))) - { + if (isonline() && (uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0))) { // Check if user should be invisible // Or be blocked ? - if ((getWord(hContact, GG_KEY_APPARENT, (uint16_t)ID_STATUS_ONLINE) == ID_STATUS_OFFLINE) || !Contact::OnList(hContact)) - { + if (!Contact::OnList(hContact)) { gg_EnterCriticalSection(&sess_mutex, "notifyuser", 77, "sess_mutex", 1); if (refresh) { gg_remove_notify_ex(m_sess, uin, GG_USER_NORMAL); @@ -1365,8 +1363,7 @@ void GaduProto::notifyuser(MCONTACT hContact, int refresh) gg_add_notify_ex(m_sess, uin, GG_USER_OFFLINE); gg_LeaveCriticalSection(&sess_mutex, "notifyuser", 77, 1, "sess_mutex", 1); } - else if (getByte(hContact, GG_KEY_BLOCK, 0)) - { + else if (getByte(hContact, GG_KEY_BLOCK, 0)) { gg_EnterCriticalSection(&sess_mutex, "notifyuser", 78, "sess_mutex", 1); if (refresh) gg_remove_notify_ex(m_sess, uin, GG_USER_OFFLINE); @@ -1409,7 +1406,7 @@ void GaduProto::notifyall() int cc = 0; for (auto &hContact : AccContacts()) { if (uins[cc] = getDword(hContact, GG_KEY_UIN, 0)) { - if ((getWord(hContact, GG_KEY_APPARENT, (uint16_t)ID_STATUS_ONLINE) == ID_STATUS_OFFLINE) || !Contact::OnList(hContact)) + if (!Contact::OnList(hContact)) types[cc] = GG_USER_OFFLINE; else if (getByte(hContact, GG_KEY_BLOCK, 0)) types[cc] = GG_USER_BLOCKED; -- cgit v1.2.3