Fixed possible crash on sponsored messages.

This commit is contained in:
23rd 2021-11-05 08:27:33 +03:00
parent f4a3d87b5d
commit 5c4b68d632
1 changed files with 3 additions and 1 deletions

View File

@ -634,7 +634,9 @@ bool HistoryItem::canStopPoll() const {
}
bool HistoryItem::canDelete() const {
if (!IsServerMsgId(id) && serviceMsg()) {
if (isSponsored()) {
return false;
} else if (!IsServerMsgId(id) && serviceMsg()) {
return false;
} else if (!isHistoryEntry() && !isScheduled()) {
return false;