Updates for 1.4.1
This commit is contained in:
@@ -386,6 +386,8 @@ void TSServer::client_move(
|
||||
auto s_source_channel = dynamic_pointer_cast<ServerChannel>(target->currentChannel);
|
||||
assert(!target->currentChannel || s_source_channel != nullptr);
|
||||
|
||||
deque<property::ClientProperties> client_updates;
|
||||
std::deque<property::ClientProperties> changed_groups{};
|
||||
if(target_channel) {
|
||||
assert(s_target_channel);
|
||||
if(s_target_channel->deleted) {
|
||||
@@ -393,6 +395,10 @@ void TSServer::client_move(
|
||||
s_target_channel = dynamic_pointer_cast<ServerChannel>(target_channel);
|
||||
assert(s_target_channel);
|
||||
}
|
||||
|
||||
/* update the group properties here already, so for all enter views we could just send the new props directly */
|
||||
changed_groups = this->groups->update_server_group_property(target, true, s_target_channel);
|
||||
client_updates.insert(client_updates.end(), changed_groups.begin(), changed_groups.end()); //TODO: Only update for clients which have no enter?
|
||||
}
|
||||
auto l_target_channel = s_target_channel ? this->channelTree->findLinkedChannel(s_target_channel->channelId()) : nullptr;
|
||||
auto l_source_channel = s_source_channel ? this->channelTree->findLinkedChannel(s_source_channel->channelId()) : nullptr;
|
||||
@@ -486,7 +492,6 @@ void TSServer::client_move(
|
||||
unique_lock client_channel_lock(target->channel_lock);
|
||||
TIMING_STEP(timings, "lock own tr");
|
||||
|
||||
deque<property::ClientProperties> client_updates;
|
||||
if (s_source_channel) {
|
||||
s_source_channel->properties()[property::CHANNEL_LAST_LEFT] = chrono::duration_cast<chrono::milliseconds>(chrono::system_clock::now().time_since_epoch()).count();
|
||||
auto source_channel_group = this->groups->getChannelGroupExact(target->getClientDatabaseId(), s_source_channel, false);
|
||||
@@ -509,10 +514,8 @@ void TSServer::client_move(
|
||||
}
|
||||
|
||||
if (s_target_channel) {
|
||||
auto changed_groups = this->groups->update_server_group_property(target, false);
|
||||
if(target->update_cached_permissions()) /* update cached calculated permissions */
|
||||
target->sendNeededPermissions(false);
|
||||
client_updates.insert(client_updates.end(), changed_groups.begin(), changed_groups.end());
|
||||
TIMING_STEP(timings, "perm gr upd");
|
||||
|
||||
if(s_source_channel) {
|
||||
|
||||
Reference in New Issue
Block a user