mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-30 03:34:17 +00:00
Work better with 'unlimited' config time limits.
This commit is contained in:
parent
aa5781b550
commit
63098d3c7d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user