summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/dispatch.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-22 20:32:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-22 20:32:09 +0300
commitaffa00fc0e6eb69d36b6bdb66bbef468f9ed236a (patch)
tree95c32bcfff2c75774a864ac0e8e1f234525a1bdb /protocols/Discord/src/dispatch.cpp
parent833690b17bdf2393d41bf2f08334a7983eefab82 (diff)
channel renaming support
Diffstat (limited to 'protocols/Discord/src/dispatch.cpp')
-rw-r--r--protocols/Discord/src/dispatch.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp
index 69e3879c45..aad6c1f478 100644
--- a/protocols/Discord/src/dispatch.cpp
+++ b/protocols/Discord/src/dispatch.cpp
@@ -132,6 +132,12 @@ void CDiscordProto::OnCommandChannelUpdated(const JSONNode &pRoot)
if (pGuild == nullptr)
return;
+ CMStringW wszName = pRoot["name"].as_mstring();
+ if (!wszName.IsEmpty()) {
+ CMStringW wszNewName = pGuild->wszName + L"#" + wszName;
+ Chat_ChangeSessionName(m_szModuleName, pUser->wszUsername, wszNewName);
+ }
+
CMStringW wszTopic = pRoot["topic"].as_mstring();
Chat_SetStatusbarText(m_szModuleName, pUser->wszUsername, wszTopic);