From 7a45a4c40dfe9074f572254ada8d34f4c59b4c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20S=C5=82omkowski?= Date: Mon, 14 Dec 2015 02:36:25 +0100 Subject: [PATCH] Fix wrong channel texting after channel join. --- include/mumlib.hpp | 2 +- include/mumlib/Callback.hpp | 2 +- src/mumlib.cpp | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/mumlib.hpp b/include/mumlib.hpp index 992321c..5df4f50 100644 --- a/include/mumlib.hpp +++ b/include/mumlib.hpp @@ -41,7 +41,7 @@ namespace mumlib { void sendTextMessage(std::string message); - void joinChannel(int channel_id); + void joinChannel(int channelId); private: _Mumlib_Private *impl; diff --git a/include/mumlib/Callback.hpp b/include/mumlib/Callback.hpp index 7ff4aa6..a11b7b4 100644 --- a/include/mumlib/Callback.hpp +++ b/include/mumlib/Callback.hpp @@ -179,7 +179,7 @@ namespace mumlib { string welcome_text, int32_t session, int32_t max_bandwidth, - int64_t permissions); + int64_t permissions) override; virtual void channelRemove(uint32_t channel_id) override; diff --git a/src/mumlib.cpp b/src/mumlib.cpp index 3465d6d..10609cb 100644 --- a/src/mumlib.cpp +++ b/src/mumlib.cpp @@ -379,9 +379,10 @@ namespace mumlib { impl->transport.sendControlMessage(MessageType::TEXTMESSAGE, textMessage); } - void Mumlib::joinChannel(int channel_id) { + void Mumlib::joinChannel(int channelId) { MumbleProto::UserState userState; - userState.set_channel_id(channel_id); + userState.set_channel_id(channelId); impl->transport.sendControlMessage(MessageType::USERSTATE, userState); + impl->channelId = channelId; } }