diff options
Diffstat (limited to 'protocols/FacebookRM/contacts.cpp')
-rw-r--r-- | protocols/FacebookRM/contacts.cpp | 25 |
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);
|