mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-24 09:16:57 +00:00
Fix crash in local changelog messages.
This commit is contained in:
parent
352768053d
commit
0c906a5e6d
@ -439,7 +439,7 @@ void SendConfirmedFile(
|
||||
| (localEntities.v.isEmpty()
|
||||
? MTPDmessage::Flag()
|
||||
: MTPDmessage::Flag::f_entities)),
|
||||
MTP_int(newId.msg),
|
||||
MTP_int(0), // Not used (would've been trimmed to 32 bits).
|
||||
peerToMTP(messageFromId),
|
||||
peerToMTP(file->to.peer),
|
||||
MTPMessageFwdHeader(),
|
||||
|
@ -3981,10 +3981,12 @@ void Session::insertCheckedServiceNotification(
|
||||
| MessageFlag::LocalHistoryEntry;
|
||||
auto sending = TextWithEntities(), left = message;
|
||||
while (TextUtilities::CutPart(sending, left, MaxMessageSize)) {
|
||||
const auto id = nextLocalMessageId();
|
||||
addNewMessage(
|
||||
id,
|
||||
MTP_message(
|
||||
MTP_flags(flags),
|
||||
MTP_int(nextLocalMessageId()),
|
||||
MTP_int(0), // Not used (would've been trimmed to 32 bits).
|
||||
peerToMTP(PeerData::kServiceNotificationsId),
|
||||
peerToMTP(PeerData::kServiceNotificationsId),
|
||||
MTPMessageFwdHeader(),
|
||||
|
@ -136,7 +136,7 @@ AdminLog::OwnedItem GenerateForwardedItem(
|
||||
const auto flags = Flag::f_from_id | Flag::f_fwd_from;
|
||||
const auto item = MTP_message(
|
||||
MTP_flags(flags),
|
||||
MTP_int(0),
|
||||
MTP_int(0), // Not used (would've been trimmed to 32 bits).
|
||||
peerToMTP(history->peer->id),
|
||||
peerToMTP(history->peer->id),
|
||||
MTP_messageFwdHeader(
|
||||
|
Loading…
Reference in New Issue
Block a user