mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Work better with 'unlimited' config time limits.
This commit is contained in:
@@ -372,8 +372,8 @@ bool HistoryItem::canDeleteForEveryone(TimeId now) const {
|
||||
const auto messageTooOld = messageToMyself
|
||||
? false
|
||||
: peer->isUser()
|
||||
? (now >= date() + Global::RevokePrivateTimeLimit())
|
||||
: (now >= date() + Global::RevokeTimeLimit());
|
||||
? (now - date() >= Global::RevokePrivateTimeLimit())
|
||||
: (now - date() >= Global::RevokeTimeLimit());
|
||||
if (id < 0 || messageToMyself || messageTooOld || isPost()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -590,7 +590,7 @@ bool HistoryMessage::allowsEdit(TimeId now) const {
|
||||
}();
|
||||
const auto messageTooOld = (messageToMyself || canPinInMegagroup)
|
||||
? false
|
||||
: (now >= date() + Global::EditTimeLimit());
|
||||
: (now - date() >= Global::EditTimeLimit());
|
||||
if (id < 0 || messageTooOld) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user