Fix CDN downloads after authorization.

This commit is contained in:
John Preston 2021-08-25 16:18:51 +03:00
parent 2671e67119
commit d45c530db0

View file

@ -204,16 +204,15 @@ void Session::watchDcOptionsChanges() {
});
}, _lifetime);
if (_instance->dcOptions().dcType(_shiftedDcId) == DcType::Cdn) {
_instance->dcOptions().cdnConfigChanged(
) | rpl::filter([=] {
return (_private != nullptr);
}) | rpl::start_with_next([=] {
InvokeQueued(_private, [captured = _private] {
captured->cdnConfigChanged();
});
}, _lifetime);
}
_instance->dcOptions().cdnConfigChanged(
) | rpl::filter([=] {
return (_private != nullptr)
&& (_instance->dcOptions().dcType(_shiftedDcId) == DcType::Cdn);
}) | rpl::start_with_next([=] {
InvokeQueued(_private, [captured = _private] {
captured->cdnConfigChanged();
});
}, _lifetime);
}
void Session::start() {