diff options
-rw-r--r-- | src/mir_app/src/chat_tools.cpp | 8 |
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;
|