mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45: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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MediaCall::allowsRevoke() const {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MediaCall::updateInlineResultMedia(const MTPMessageMedia &media) {
|
bool MediaCall::updateInlineResultMedia(const MTPMessageMedia &media) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -267,7 +267,6 @@ public:
|
|||||||
QString pinnedTextSubstring() const override;
|
QString pinnedTextSubstring() const override;
|
||||||
TextForMimeData clipboardText() const override;
|
TextForMimeData clipboardText() const override;
|
||||||
bool allowsForward() const override;
|
bool allowsForward() const override;
|
||||||
bool allowsRevoke() const override;
|
|
||||||
|
|
||||||
bool updateInlineResultMedia(const MTPMessageMedia &media) override;
|
bool updateInlineResultMedia(const MTPMessageMedia &media) override;
|
||||||
bool updateSentMedia(const MTPMessageMedia &media) override;
|
bool updateSentMedia(const MTPMessageMedia &media) override;
|
||||||
|
@@ -494,11 +494,13 @@ bool HistoryItem::canDeleteForEveryone(TimeId now) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!toHistoryMessage()) {
|
if (!peer->isUser()) {
|
||||||
return false;
|
if (!toHistoryMessage()) {
|
||||||
} else if (const auto media = this->media()) {
|
|
||||||
if (!media->allowsRevoke()) {
|
|
||||||
return false;
|
return false;
|
||||||
|
} else if (const auto media = this->media()) {
|
||||||
|
if (!media->allowsRevoke()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!out()) {
|
if (!out()) {
|
||||||
|
Reference in New Issue
Block a user