2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Fixed Api requests for statistics with non-default DC.

This commit is contained in:
23rd
2023-11-11 14:58:44 +03:00
parent 468d4c5e4f
commit 1e6cf839e2
7 changed files with 41 additions and 61 deletions

View File

@@ -4532,6 +4532,15 @@ uint64 Session::wallpapersHash() const {
return _wallpapersHash;
}
MTP::DcId Session::statsDcId(not_null<ChannelData*> channel) {
const auto it = _channelStatsDcIds.find(channel);
return (it == end(_channelStatsDcIds)) ? MTP::DcId(0) : it->second;
}
void Session::applyStatsDcId(not_null<ChannelData*> channel, MTP::DcId dcId) {
_channelStatsDcIds[channel] = dcId;
}
void Session::webViewResultSent(WebViewResultSent &&sent) {
return _webViewResultSent.fire(std::move(sent));
}