Слияние сделал модуль upstream-sync, конфликты разобраны вручную основным
агентом 2026-11-05: фоновый Claude модуля не смог войти в аккаунт
("Not logged in"), поэтому разбор не состоялся.
Решения:
- 15 файлов, которые форк убрал из системы контроля версий (AGENTS.md,
.agents/, .claude/, .github/workflows/): остаются удалёнными, как в
коммите a00235d71e и в слиянии 7.3.4.
- версии: 7.3.5 (7003005) из оригинала; название ZaStoGram в Telegram.rc,
AppBetaVersion = false и BetaChannel 0 сохранены; changelog.txt получает
блок 7.3.5, заголовок 7.3.4 остаётся форковым.
- file_upload.cpp: наша сигнатура sendPreparedRequest с FileTransferRpcKind
плюс .part = index из оригинала.
- wallet_session.h, location_picker.*: оставлены наши пути заголовков
(mtproto/instance/sender.h, mtproto/config/mtproto_config.h).
- iv_editor_widget.cpp: оставлена наша реализация на fieldTextWithSelection();
вспомогательная CaptureCommittedFieldSelection из оригинала убрана: она
ссылалась на отсутствующий у нас Widget::richOffsetForFieldOffset и осталась
бы неиспользуемой.
Конфликты разбирал ИИ: да.
94 lines
No EOL
2.4 KiB
C++
94 lines
No EOL
2.4 KiB
C++
/*
|
|
This file is part of Telegram Desktop,
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
For license and copyright information please follow this link:
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
*/
|
|
#pragma once
|
|
|
|
#include "mtproto/config/mtproto_dc_options.h"
|
|
|
|
namespace MTP {
|
|
|
|
struct ConfigFields {
|
|
explicit ConfigFields(Environment environment);
|
|
|
|
int chatSizeMax = 200;
|
|
int megagroupSizeMax = 10000;
|
|
int forwardedCountMax = 100;
|
|
int onlineUpdatePeriod = 120000;
|
|
int offlineBlurTimeout = 5000;
|
|
int offlineIdleTimeout = 30000;
|
|
int onlineFocusTimeout = 1000; // Not from the server config.
|
|
int onlineCloudTimeout = 300000;
|
|
int notifyCloudDelay = 30000;
|
|
int notifyDefaultDelay = 1500;
|
|
int editTimeLimit = 172800;
|
|
int revokeTimeLimit = 172800;
|
|
int revokePrivateTimeLimit = 172800;
|
|
bool revokePrivateInbox = false;
|
|
int stickersRecentLimit = 30;
|
|
QString internalLinksDomain = u"https://t.me/"_q;
|
|
int channelsReadMediaPeriod = 86400 * 7;
|
|
int callReceiveTimeoutMs = 20000;
|
|
int callRingTimeoutMs = 90000;
|
|
int callConnectTimeoutMs = 30000;
|
|
int callPacketTimeoutMs = 10000;
|
|
int webFileDcId = 4;
|
|
QString txtDomainString;
|
|
bool blockedMode = false;
|
|
int captionLengthMax = 1024;
|
|
int ratingDecay = 2419200;
|
|
QString reactionDefaultEmoji;
|
|
uint64 reactionDefaultCustom = 0;
|
|
QString autologinToken;
|
|
|
|
QString gifSearchUsername;
|
|
};
|
|
|
|
class Config final {
|
|
struct PrivateTag {
|
|
};
|
|
|
|
public:
|
|
explicit Config(Environment environment);
|
|
Config(const Config &other);
|
|
|
|
[[nodiscard]] QByteArray serialize() const;
|
|
[[nodiscard]] static std::unique_ptr<Config> FromSerialized(
|
|
const QByteArray &serialized);
|
|
|
|
[[nodiscard]] DcOptions &dcOptions() {
|
|
return _dcOptions;
|
|
}
|
|
[[nodiscard]] const DcOptions &dcOptions() const {
|
|
return _dcOptions;
|
|
}
|
|
[[nodiscard]] MTP::Environment environment() const {
|
|
return _dcOptions.environment();
|
|
}
|
|
[[nodiscard]] bool isTestMode() const {
|
|
return _dcOptions.isTestMode();
|
|
}
|
|
|
|
void apply(const MTPDconfig &data);
|
|
|
|
[[nodiscard]] const ConfigFields &values() const;
|
|
[[nodiscard]] rpl::producer<> updates() const;
|
|
|
|
// Set from legacy local stored values.
|
|
void setChatSizeMax(int value);
|
|
void setStickersRecentLimit(int value);
|
|
void setMegagroupSizeMax(int value);
|
|
void setTxtDomainString(const QString &value);
|
|
|
|
private:
|
|
DcOptions _dcOptions;
|
|
ConfigFields _fields;
|
|
|
|
rpl::event_stream<> _updates;
|
|
|
|
};
|
|
|
|
} // namespace MTP
|