summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/dispatch.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-12 21:04:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-12 21:04:12 +0300
commit2651148625bef56f1fe32c638259d20abb001d68 (patch)
tree84515d43d4856003866e02f888128a6369e92f32 /protocols/Discord/src/dispatch.cpp
parent23764bc5bfbe6986a1c9a087510e6eeb2521c330 (diff)
support for Discord message markup
Diffstat (limited to 'protocols/Discord/src/dispatch.cpp')
-rw-r--r--protocols/Discord/src/dispatch.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp
index 1f4f9b3993..0da160b973 100644
--- a/protocols/Discord/src/dispatch.cpp
+++ b/protocols/Discord/src/dispatch.cpp
@@ -370,6 +370,14 @@ void CDiscordProto::OnCommandMessage(const JSONNode &pRoot)
else {
debugLogA("store a message into the group channel id %lld", channelId);
+ SESSION_INFO *si = pci->SM_FindSession(wszChannelId, m_szModuleName);
+ if (si == NULL) {
+ debugLogA("nessage to unknown channal %lld ignored", channelId);
+ return;
+ }
+
+ ParseSpecialChars(si, wszText);
+
GCDEST gcd = { m_szModuleName, wszChannelId, GC_EVENT_MESSAGE };
GCEVENT gce = { &gcd };
gce.dwFlags = GCEF_ADDTOLOG;