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/JabberG/src/jabber_proto.cpp | 41 ---------------------------------- protocols/JabberG/src/jabber_proto.h | 1 - 2 files changed, 42 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 63009c39fc..5eda5e8ff9 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -983,47 +983,6 @@ int CJabberProto::SendMsgEx(MCONTACT hContact, const char *pszSrc, XmlNode &m) return id; } -//////////////////////////////////////////////////////////////////////////////////////// -// rSetApparentMode - sets the visibility status - -int CJabberProto::SetApparentMode(MCONTACT hContact, int mode) -{ - if (mode != 0 && mode != ID_STATUS_ONLINE && mode != ID_STATUS_OFFLINE) - return 1; - - int oldMode = getWord(hContact, "ApparentMode", 0); - if (mode == oldMode) - return 1; - - setWord(hContact, "ApparentMode", (uint16_t)mode); - if (!m_bJabberOnline) - return 0; - - ptrA jid(getUStringA(hContact, "jid")); - if (jid == nullptr) - return 0; - - switch (mode) { - case ID_STATUS_ONLINE: - if (m_iStatus == ID_STATUS_INVISIBLE || oldMode == ID_STATUS_OFFLINE) - m_ThreadInfo->send(XmlNode("presence") << XATTR("to", jid)); - break; - case ID_STATUS_OFFLINE: - if (m_iStatus != ID_STATUS_INVISIBLE || oldMode == ID_STATUS_ONLINE) - SendPresenceTo(ID_STATUS_INVISIBLE, jid); - break; - case 0: - if (oldMode == ID_STATUS_ONLINE && m_iStatus == ID_STATUS_INVISIBLE) - SendPresenceTo(ID_STATUS_INVISIBLE, jid); - else if (oldMode == ID_STATUS_OFFLINE && m_iStatus != ID_STATUS_INVISIBLE) - SendPresenceTo(m_iStatus, jid); - break; - } - - // TODO: update the zebra list (jabber:iq:privacy) - return 0; -} - //////////////////////////////////////////////////////////////////////////////////////// // JabberSetStatus - sets the protocol status diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 54359d8d8c..824ad6c929 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -141,7 +141,6 @@ struct CJabberProto : public PROTO, public IJabberInterface int SendMsg(MCONTACT hContact, MEVENT, const char *msg) override; int SendMsgEx(MCONTACT hContact, const char *msg, XmlNode &m); - int SetApparentMode(MCONTACT hContact, int mode) override; int SetStatus(int iNewStatus) override; HANDLE GetAwayMsg(MCONTACT hContact) override; -- cgit v1.2.3