summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_events.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-16 14:57:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-16 14:57:07 +0300
commitecee3cf571be168342936201457d00d094239a80 (patch)
tree06b3d401c7a1a76622c05b1b08d5fb33ae0aa324 /protocols/JabberG/src/jabber_events.cpp
parent93e78f0795929ac87f4b85ffc9af077b257dbcda (diff)
Jabber:
- useless parameter in CJabberProto::OnAddContactForever removed; - when we receive subscription = remove we just change it to SUB_NONE instead of removing contact from LIST_ROSTER; - code cleaning
Diffstat (limited to 'protocols/JabberG/src/jabber_events.cpp')
-rw-r--r--protocols/JabberG/src/jabber_events.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index a05355f973..ec31312ec5 100644
--- a/protocols/JabberG/src/jabber_events.cpp
+++ b/protocols/JabberG/src/jabber_events.cpp
@@ -125,11 +125,8 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT
}
}
-void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
+void __cdecl CJabberProto::OnAddContactForever(MCONTACT hContact)
{
- if (cws->value.type != DBVT_DELETED && !(cws->value.type == DBVT_BYTE && cws->value.bVal == 0))
- return;
-
ptrW jid(getWStringA(hContact, "jid"));
if (jid == nullptr)
return;
@@ -169,8 +166,10 @@ int __cdecl CJabberProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
OnRenameGroup(cws, hContact);
else if (!strcmp(cws->szSetting, "MyHandle"))
OnRenameContact(cws, hContact);
- else if (!strcmp(cws->szSetting, "NotOnList"))
- OnAddContactForever(cws, hContact);
+ else if (!strcmp(cws->szSetting, "NotOnList")) {
+ if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0))
+ OnAddContactForever(hContact);
+ }
return 0;
}