mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-07 04:05:17 +00:00
Support server-provided limits for rich messages.
This commit is contained in:
@@ -92,6 +92,7 @@ namespace Data {
|
||||
namespace {
|
||||
|
||||
constexpr auto kNextForUpgradeGiftTimeout = 5 * crl::time(1000);
|
||||
constexpr auto kMaxServiceNotificationMessageSize = 4096;
|
||||
|
||||
using ViewElement = HistoryView::Element;
|
||||
|
||||
@@ -5400,7 +5401,10 @@ void Session::insertCheckedServiceNotification(
|
||||
const auto localFlags = MessageFlag::ClientSideUnread
|
||||
| MessageFlag::Local;
|
||||
auto sending = TextWithEntities(), left = message;
|
||||
while (TextUtilities::CutPart(sending, left, MaxMessageSize)) {
|
||||
while (TextUtilities::CutPart(
|
||||
sending,
|
||||
left,
|
||||
kMaxServiceNotificationMessageSize)) {
|
||||
const auto id = nextLocalMessageId();
|
||||
addNewMessage(
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user