summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-07 14:04:18 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-07 14:04:18 +0300
commit15ca96698292748d79b3961c28b896d94facbac2 (patch)
tree5f0bd75066d437c094e8b13042d928303d4669ae /src
parent1213ce7d1386f5677342951df1a80d589ce2779b (diff)
if a user's nick is skipped, we try to restore it from the users list
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/chat_svc.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index 2a09052ef1..c5ca2b9255 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -550,8 +550,13 @@ EXTERN_C MIR_APP_DLL(int) Chat_Event(GCEVENT *gce)
return 0;
if (si && (si->bInitDone || gcd->iType == GC_EVENT_TOPIC || (gcd->iType == GC_EVENT_JOIN && gce->bIsMe))) {
+ if (gce->ptszNick == nullptr && gce->ptszUID != nullptr) {
+ USERINFO *ui = chatApi.UM_FindUser(si->pUsers, gce->ptszUID);
+ if (ui != nullptr)
+ gce->ptszNick = ui->pszNick;
+ }
+
int isOk = SM_AddEvent(pWnd, pMod, gce, bIsHighlighted);
-
if (si->hWnd) {
if (isOk)
SendMessage(si->hWnd, GC_ADDLOG, 0, 0);