summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-03-09 17:08:59 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-03-09 17:08:59 +0300
commitd94c7e8155f9052935b768368e094f80c730b013 (patch)
tree6877b94576408c6a1b9c09b523261fadb53299cc /src/mir_app
parent45fc2c250c1f5044747ba90c733032b3e0b6cfff (diff)
fixes #4274 (some group chat popups are displayed with incorrect nick)
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/chat_tools.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 9f017350c7..172cbf1e8b 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -734,7 +734,6 @@ void Chat_EventToGC(SESSION_INFO *si, MEVENT hDbEvent)
if (mir_strcmp(szProto, dbei.szModule) || !g_chatApi.DbEventIsShown(dbei) || !dbei.szUserId)
return;
- Utf2T wszUserId(dbei.szUserId);
CMStringW wszText(ptrW(DbEvent_GetTextW(&dbei)));
wszText.Replace(L"%", L"%%");
@@ -742,7 +741,12 @@ void Chat_EventToGC(SESSION_INFO *si, MEVENT hDbEvent)
gce.dwFlags = GCEF_ADDTOLOG;
if (dbei.flags & DBEF_READ)
gce.dwFlags |= GCEF_NOTNOTIFY;
- gce.pszUID.w = wszUserId;
+
+ Utf2T wszUserId(dbei.szUserId);
+ if (g_chatApi.UM_FindUser(si, wszUserId))
+ gce.pszUID.w = wszUserId;
+ else
+ gce.pszNick.w = wszUserId;
gce.pszText.w = wszText;
gce.time = dbei.timestamp;
gce.hEvent = hDbEvent;