summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-08-21 21:42:18 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-08-21 21:42:18 +0300
commit8994f7fe656adab35315fe63e866ed3356211684 (patch)
treeca48ec2b4b6a1c8e5efb3cae91bce0ec0b084014 /plugins
parentf351f4eaa3808b6b5c873cccc7072da2e0c86c8a (diff)
fixes #3650 (NewStory: входы в групчат показываются от моего имени)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewStory/src/templates.cpp9
1 files changed, 6 insertions, 3 deletions
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);