diff options
Diffstat (limited to 'protocols/MRA')
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 13 | ||||
-rw-r--r-- | protocols/MRA/src/stdafx.h | 2 |
2 files changed, 4 insertions, 11 deletions
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index da0f03fd69..d894a0299f 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -526,16 +526,9 @@ MCONTACT CMraProto::MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNe //not already there: add
if (IsEMailChatAgent(szEmail)) {
CMStringW wszEMail = szEmail;
- if (Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszEMail, wszEMail) == 0) {
- BOOL bChatAdded = FALSE;
- for (hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if (mraGetStringA(hContact, "ChatRoomID", szEMailLocal)) {
- if (szEMailLocal == szEmail) {
- bChatAdded = TRUE;
- break;
- }
- }
- }
+ GCSessionInfoBase *si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszEMail, wszEMail);
+ if (si != 0) {
+ bool bChatAdded = (si->hContact != NULL);
if (bChatAdded == FALSE)
hContact = NULL;
}
diff --git a/protocols/MRA/src/stdafx.h b/protocols/MRA/src/stdafx.h index 29dfaa5fe9..6d61cdcc49 100644 --- a/protocols/MRA/src/stdafx.h +++ b/protocols/MRA/src/stdafx.h @@ -45,7 +45,7 @@ #include <m_nudge.h>
#include <m_folders.h>
#include <m_avatars.h>
-#include <m_chat.h>
+#include <m_chat_int.h>
#include <m_extraicons.h>
#include <m_music.h>
#include <m_xstatus.h>
|