From 13c033c257f6c083b0c46b4fa28601db5a0b6335 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Feb 2014 20:50:07 +0000 Subject: MS_MC_GETMETACONTACT => db_mc_getMeta git-svn-id: http://svn.miranda-ng.org/main/trunk@8317 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Nudge/src/main.cpp | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'plugins/Nudge/src') diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 1c19a70d78..bf6258f156 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -459,12 +459,9 @@ void Nudge_SentStatus(CNudgeElement n, MCONTACT hContact) dbei.cbBlob = (DWORD)strlen(buff) + 1; dbei.pBlob = (PBYTE)buff; - INT_PTR res = CallService(MS_MC_GETMETACONTACT, hContact, 0); //try to retrieve the metacontact if some - if (res != CALLSERVICE_NOTFOUND) { - MCONTACT hMetaContact = (MCONTACT)res; - if (hMetaContact != NULL) // metacontact - db_event_add(hMetaContact, &dbei); - } + MCONTACT hMetaContact = db_mc_getMeta(hContact); + if (hMetaContact != NULL) // metacontact + db_event_add(hMetaContact, &dbei); db_event_add(hContact, &dbei); mir_free(buff); @@ -482,13 +479,10 @@ void Nudge_ShowStatus(CNudgeElement n, MCONTACT hContact, DWORD timestamp) dbei.cbBlob = (DWORD)strlen(buff) + 1; dbei.pBlob = (PBYTE)buff; - INT_PTR res = CallService(MS_MC_GETMETACONTACT, hContact, 0); //try to retrieve the metacontact if some - if (res != CALLSERVICE_NOTFOUND) { - MCONTACT hMetaContact = (MCONTACT)res; - if (hMetaContact != NULL) { //metacontact - db_event_add(hMetaContact, &dbei); - dbei.flags |= DBEF_READ; - } + MCONTACT hMetaContact = db_mc_getMeta(hContact); + if (hMetaContact != NULL) { //metacontact + db_event_add(hMetaContact, &dbei); + dbei.flags |= DBEF_READ; } db_event_add(hContact, &dbei); @@ -497,12 +491,9 @@ void Nudge_ShowStatus(CNudgeElement n, MCONTACT hContact, DWORD timestamp) MCONTACT Nudge_GethContact(MCONTACT hContact) { - INT_PTR res = CallService(MS_MC_GETMETACONTACT, hContact, 0); - if (res != CALLSERVICE_NOTFOUND) { - MCONTACT hMetaContact = (MCONTACT)res; - if (hMetaContact != NULL) - return hMetaContact; - } + MCONTACT hMetaContact = db_mc_getMeta(hContact); + if (hMetaContact != NULL) + return hMetaContact; return hContact; } -- cgit v1.2.3