mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-10 08:51:12 +00:00
fixed crash when deleting replyTo msg via inline bot
This commit is contained in:
parent
931c249afe
commit
709c18e6fc
@ -7086,10 +7086,16 @@ HistoryItem *HistoryReply::replyToMessage() const {
|
||||
|
||||
void HistoryReply::replyToReplaced(HistoryItem *oldItem, HistoryItem *newItem) {
|
||||
if (replyToMsg == oldItem) {
|
||||
delete _replyToVia;
|
||||
_replyToVia = 0;
|
||||
replyToMsg = newItem;
|
||||
if (!newItem) {
|
||||
replyToMsgId = 0;
|
||||
initDimensions();
|
||||
} else if (!replyToMsg->toHistoryForwarded()) {
|
||||
if (UserData *bot = replyToMsg->viaBot()) {
|
||||
_replyToVia = new HistoryMessageVia(peerToUser(bot->id));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user