mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-12 06:33:59 +00:00
Support server-provided limits for rich messages.
This commit is contained in:
@@ -176,6 +176,20 @@ int PremiumLimits::captionLengthCurrent() const {
|
||||
: captionLengthDefault();
|
||||
}
|
||||
|
||||
int PremiumLimits::messageLengthDefault() const {
|
||||
return appConfigLimit("message_length_limit_default", 4096);
|
||||
}
|
||||
|
||||
int PremiumLimits::messageLengthPremium() const {
|
||||
return appConfigLimit("message_length_limit_premium", 8192);
|
||||
}
|
||||
|
||||
int PremiumLimits::messageLengthCurrent() const {
|
||||
return isPremium()
|
||||
? messageLengthPremium()
|
||||
: messageLengthDefault();
|
||||
}
|
||||
|
||||
int PremiumLimits::uploadMaxDefault() const {
|
||||
return appConfigLimit("upload_max_fileparts_default", 4000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user