summaryrefslogtreecommitdiff
path: root/plugins/Msg_Export/src/utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-03-26 17:31:26 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-03-26 17:31:26 +0300
commit1adcb519ac395a83979c72f3cfd7e1f9e01d4962 (patch)
treeade672a777ca85590c8bbea47407a85c4461f187 /plugins/Msg_Export/src/utils.cpp
parent627fd4f0a93b225d475d81746ad12bbdf1be95ee (diff)
fixes #4302 (Msg_Export: при экспорте истории ветки Telegram в поле "Контакт" помещается первый ник в истории)
Diffstat (limited to 'plugins/Msg_Export/src/utils.cpp')
-rw-r--r--plugins/Msg_Export/src/utils.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 071d2ae43f..88190f67e4 100644
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -621,10 +621,6 @@ 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))
- 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);
@@ -704,6 +700,11 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF
return true;
}
+ 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;
+
// Get time stamp
int nIndent = mir_snwprintf(szTemp, L"%-*s", (int)nFirstColumnWidth, dbei.flags & DBEF_SENT ? sLocalUser.c_str() : sRemoteUser.c_str());