Show limit-reached message on community peers limit

This commit is contained in:
John Preston
2026-06-23 15:44:48 +04:00
parent 8a0e249fa7
commit 32e533aba0
5 changed files with 37 additions and 2 deletions
@@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_session.h"
#include "data/data_user.h"
#include "history/history.h"
#include "main/main_app_config.h"
#include "main/main_session.h"
namespace Api {
@@ -47,6 +48,12 @@ namespace {
} // namespace
int CommunityPeersLimit(not_null<Main::Session*> session) {
return session->appConfig().get<int>(
u"community_peers_limit"_q,
session->isTestMode() ? 10 : 100);
}
Communities::Communities(not_null<ApiWrap*> api)
: _session(&api->session())
, _api(&api->instance()) {