From 2651148625bef56f1fe32c638259d20abb001d68 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 12 Feb 2017 21:04:03 +0300 Subject: support for Discord message markup --- protocols/Discord/src/dispatch.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'protocols/Discord/src/dispatch.cpp') 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; -- cgit v1.2.3