mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Don't pass wide fake MsgId through MTPMessage.
This commit is contained in:
@@ -2166,12 +2166,21 @@ HistoryItem *Session::addNewMessage(
|
||||
const MTPMessage &data,
|
||||
MessageFlags localFlags,
|
||||
NewMessageType type) {
|
||||
return addNewMessage(IdFromMessage(data), data, localFlags, type);
|
||||
}
|
||||
|
||||
HistoryItem *Session::addNewMessage(
|
||||
MsgId id,
|
||||
const MTPMessage &data,
|
||||
MessageFlags localFlags,
|
||||
NewMessageType type) {
|
||||
const auto peerId = PeerFromMessage(data);
|
||||
if (!peerId) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const auto result = history(peerId)->addNewMessage(
|
||||
id,
|
||||
data,
|
||||
localFlags,
|
||||
type);
|
||||
|
||||
Reference in New Issue
Block a user