mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Allow revoking any messages in private chats.
This commit is contained in:
@@ -975,10 +975,6 @@ bool MediaCall::allowsForward() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MediaCall::allowsRevoke() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MediaCall::updateInlineResultMedia(const MTPMessageMedia &media) {
|
||||
return false;
|
||||
}
|
||||
|
@@ -267,7 +267,6 @@ public:
|
||||
QString pinnedTextSubstring() const override;
|
||||
TextForMimeData clipboardText() const override;
|
||||
bool allowsForward() const override;
|
||||
bool allowsRevoke() const override;
|
||||
|
||||
bool updateInlineResultMedia(const MTPMessageMedia &media) override;
|
||||
bool updateSentMedia(const MTPMessageMedia &media) override;
|
||||
|
@@ -494,11 +494,13 @@ bool HistoryItem::canDeleteForEveryone(TimeId now) const {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!toHistoryMessage()) {
|
||||
return false;
|
||||
} else if (const auto media = this->media()) {
|
||||
if (!media->allowsRevoke()) {
|
||||
if (!peer->isUser()) {
|
||||
if (!toHistoryMessage()) {
|
||||
return false;
|
||||
} else if (const auto media = this->media()) {
|
||||
if (!media->allowsRevoke()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!out()) {
|
||||
|
Reference in New Issue
Block a user