summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/ICQ-WIM/src/utils.cpp')
-rw-r--r--protocols/ICQ-WIM/src/utils.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/utils.cpp b/protocols/ICQ-WIM/src/utils.cpp
index d5056ae184..c78cbd6972 100644
--- a/protocols/ICQ-WIM/src/utils.cpp
+++ b/protocols/ICQ-WIM/src/utils.cpp
@@ -42,9 +42,13 @@ void CIcqProto::InitContactCache()
}
}
- auto *pCache = new IcqCacheItem(GetUserId(it), it);
+ CMStringW wszId = GetUserId(it);
+ auto *pCache = FindContactByUIN(wszId);
+ if (pCache == nullptr) {
+ pCache = new IcqCacheItem(wszId, it);
+ m_arCache.insert(pCache);
+ }
pCache->m_iProcessedMsgId = getId(it, DB_KEY_LASTMSGID);
- m_arCache.insert(pCache);
}
}