From 8994f7fe656adab35315fe63e866ed3356211684 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 21 Aug 2023 21:42:18 +0300 Subject: =?UTF-8?q?fixes=20#3650=20(NewStory:=20=D0=B2=D1=85=D0=BE=D0=B4?= =?UTF-8?q?=D1=8B=20=D0=B2=20=D0=B3=D1=80=D1=83=D0=BF=D1=87=D0=B0=D1=82=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B=D0=B2=D0=B0=D1=8E=D1=82?= =?UTF-8?q?=D1=81=D1=8F=20=D0=BE=D1=82=20=D0=BC=D0=BE=D0=B5=D0=B3=D0=BE=20?= =?UTF-8?q?=D0=B8=D0=BC=D0=B5=D0=BD=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/templates.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index 463140f157..fc6bb62843 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -251,9 +251,12 @@ void vfEvent(int, TemplateVars *vars, MCONTACT, ItemData *item) // %N: Nickname if (item->dbe.flags & DBEF_SENT) { - char *proto = Proto_GetBaseAccountName(item->hContact); - ptrW nick(Contact::GetInfo(CNF_DISPLAY, 0, proto)); - vars->SetNick(nick, false); + if (!item->wszNick) { + char *proto = Proto_GetBaseAccountName(item->hContact); + ptrW nick(Contact::GetInfo(CNF_DISPLAY, 0, proto)); + vars->SetNick(nick, false); + } + else vars->SetNick(item->wszNick, false); } else { wchar_t *nick = (item->wszNick) ? item->wszNick : Clist_GetContactDisplayName(item->hContact, 0); -- cgit v1.2.3