First implementation for the conversation system (not 100% finished yet)
This commit is contained in:
@@ -112,12 +112,12 @@ void ConnectedClient::updateChannelClientProperties(bool lock_channel_tree, bool
|
||||
|
||||
deque<property::ClientProperties> notifyList;
|
||||
debugMessage(this->getServerId(), "{} Got a channel talk power of {} Talk power set is {}", CLIENT_STR_LOG_PREFIX, permission_talk_power, this->properties()[property::CLIENT_TALK_POWER].as<uint64_t>());
|
||||
if(permission_talk_power != this->properties()[property::CLIENT_TALK_POWER].as<uint64_t>() && this->currentChannel) { //We do not have to update tp if there's no channel
|
||||
if(permission_talk_power != this->properties()[property::CLIENT_TALK_POWER].as<uint64_t>()) { //We do not have to update tp if there's no channel
|
||||
this->properties()[property::CLIENT_TALK_POWER] = permission_talk_power;
|
||||
notifyList.emplace_back(property::CLIENT_TALK_POWER);
|
||||
|
||||
auto update = this->properties()[property::CLIENT_IS_TALKER].as<bool>() || this->properties()[property::CLIENT_TALK_REQUEST].as<int64_t>() > 0;
|
||||
if(update) {
|
||||
if(update && this->currentChannel) {
|
||||
if(this->currentChannel->talk_power_granted({permission_talk_power, permission_talk_power != permNotGranted})) {
|
||||
this->properties()[property::CLIENT_IS_TALKER] = 0;
|
||||
this->properties()[property::CLIENT_TALK_REQUEST] = 0;
|
||||
|
||||
Reference in New Issue
Block a user