summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp22
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp2
2 files changed, 5 insertions, 19 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index 301d87c4f3..5393ae538b 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -78,7 +78,6 @@ uint8_t CExImContactBase::fromDB(MCONTACT hContact)
uint8_t ret = FALSE;
uint8_t isChatRoom = FALSE;
LPSTR pszProto;
- LPCSTR uidSetting;
DBVARIANT dbv;
_hContact = hContact;
@@ -106,29 +105,16 @@ uint8_t CExImContactBase::fromDB(MCONTACT hContact)
db_free(&dbv);
}
- // unique id (for ChatRoom)
- if (isChatRoom = Contact::IsGroupChat(_hContact, pszProto)) {
- uidSetting = "ChatRoomID";
+ LPCSTR uidSetting = Proto_GetUniqueId(pszProto);
+ if (uidSetting != nullptr) { // valid
_pszUIDKey = mir_strdup(uidSetting);
if (!DB::Setting::GetAsIs(_hContact, pszProto, uidSetting, &_dbvUID)) {
ret = TRUE;
}
}
- // unique id (normal)
+ // fails because the protocol is no longer installed
else {
- uidSetting = Proto_GetUniqueId(pszProto);
- // valid
- if (uidSetting != nullptr && (INT_PTR)uidSetting != CALLSERVICE_NOTFOUND) {
- _pszUIDKey = mir_strdup(uidSetting);
- if (!DB::Setting::GetAsIs(_hContact, pszProto, uidSetting, &_dbvUID)) {
- ret = TRUE;
- }
- }
- // fails because the protocol is no longer installed
- else {
- // assert(ret == TRUE);
- ret = TRUE;
- }
+ ret = TRUE;
}
// nickname
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
index 1dc8fc82d4..14887c485d 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
@@ -1111,7 +1111,7 @@ uint8_t CVCardFileVCF::Export(uint8_t bExportUtf)
// contacts protocol, uin setting, uin value
//
LPCSTR uid = Proto_GetUniqueId(_pszBaseProto);
- if ((INT_PTR)uid != CALLSERVICE_NOTFOUND && uid) {
+ if (uid) {
CHAR szUID[MAXUID];
if (!db_get_static(_hContact, _pszBaseProto, uid, szUID, sizeof(szUID)))
fprintf(_pFile, "IM;%s;%s:%s\n", _pszBaseProto, uid, szUID);