summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/contacts.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2012-06-11 13:32:53 +0000
committerRobert Pösel <robyer@seznam.cz>2012-06-11 13:32:53 +0000
commit50017f9b1e19f8a89aad7c4b68e1f58f81045dad (patch)
tree3d28ad857ce2b596788776a6ae11f59b680f7d35 /protocols/FacebookRM/contacts.cpp
parent26791cc7ee10c73b00df9cc3cc38ff7ba06d8102 (diff)
FacebookRM sync.
git-svn-id: http://svn.miranda-ng.org/main/trunk@387 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/contacts.cpp')
-rw-r--r--protocols/FacebookRM/contacts.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/protocols/FacebookRM/contacts.cpp b/protocols/FacebookRM/contacts.cpp
index 66c1c3cacd..32cc1ce269 100644
--- a/protocols/FacebookRM/contacts.cpp
+++ b/protocols/FacebookRM/contacts.cpp
@@ -38,6 +38,31 @@ bool FacebookProto::IsMyContact(HANDLE hContact, bool include_chat)
}
}
+HANDLE FacebookProto::ChatIDToHContact(std::string chat_id)
+{
+ for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact;
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ {
+ if(!IsMyContact(hContact, true))
+ continue;
+
+ DBVARIANT dbv;
+ if( !DBGetContactSettingString(hContact,m_szModuleName,"ChatRoomID",&dbv) )
+ {
+ if( strcmp(chat_id.c_str(),dbv.pszVal) == 0 )
+ {
+ DBFreeVariant(&dbv);
+ return hContact;
+ } else {
+ DBFreeVariant(&dbv);
+ }
+ }
+ }
+
+ return 0;
+}
+
HANDLE FacebookProto::ContactIDToHContact(std::string user_id)
{
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);