summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src/templates.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-01-06 21:23:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-01-06 21:23:06 +0300
commit2c3777fe55340d0a5326a4ebf2576c7cfabd0e74 (patch)
treee32c6f4e724c9b2fb7dc740635afcde06f283a46 /plugins/NewStory/src/templates.cpp
parentbecaeb14aee9db4455cc04c0e06bf2c352f6d458 (diff)
fixes #2649 (NewStory: clickable filetransfers in history)
Diffstat (limited to 'plugins/NewStory/src/templates.cpp')
-rw-r--r--plugins/NewStory/src/templates.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp
index 56f45a33e9..88189452cc 100644
--- a/plugins/NewStory/src/templates.cpp
+++ b/plugins/NewStory/src/templates.cpp
@@ -249,7 +249,11 @@ void vfMessage(int, TemplateVars *vars, MCONTACT, ItemData *item)
void vfFile(int, TemplateVars *vars, MCONTACT, ItemData *item)
{
- vars->SetVar('M', item->getWBuf(), false);
+ CMStringW wszFileName(item->getWBuf());
+ wszFileName.Replace('\\', '/');
+ wszFileName = L"[url]file://" + wszFileName + L"[/url]";
+
+ vars->SetVar('M', wszFileName, false);
}
void vfUrl(int, TemplateVars *vars, MCONTACT, ItemData *item)