From abcf85f5475d62c7df49746c9d6d3f1b8ecae163 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 6 Mar 2024 12:50:52 +0300 Subject: Chat_Find(MCONTACT) - new useful helper --- plugins/Msg_Export/src/utils.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/Msg_Export/src') diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index 1c819d20de..c30c32a62b 100644 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -642,12 +642,10 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF else { sLocalUser = ptrW(GetMyOwnNick(hContact)); sRemoteUser = Clist_GetContactDisplayName(hContact); - if (dbei.szUserId && Contact::IsGroupChat(hContact)) { - ptrW contactId(Contact::GetInfo(CNF_UNIQUEID, hContact, szProto)); - if (auto *si = Chat_Find(contactId, szProto)) + if (dbei.szUserId && Contact::IsGroupChat(hContact)) + if (auto *si = Chat_Find(hContact, szProto)) if (auto *pUser = g_chatApi.UM_FindUser(si, Utf2T(dbei.szUserId))) sRemoteUser = pUser->pszNick; - } nFirstColumnWidth = max(sRemoteUser.size(), clFileTo1ColWidth[sFilePath]); nFirstColumnWidth = max(sLocalUser.size(), nFirstColumnWidth); -- cgit v1.2.3