mirror of https://github.com/procxx/kepka.git
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
|
const auto messageTooOld = messageToMyself
|
||||||
? false
|
? false
|
||||||
: peer->isUser()
|
: peer->isUser()
|
||||||
? (now >= date() + Global::RevokePrivateTimeLimit())
|
? (now - date() >= Global::RevokePrivateTimeLimit())
|
||||||
: (now >= date() + Global::RevokeTimeLimit());
|
: (now - date() >= Global::RevokeTimeLimit());
|
||||||
if (id < 0 || messageToMyself || messageTooOld || isPost()) {
|
if (id < 0 || messageToMyself || messageTooOld || isPost()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -590,7 +590,7 @@ bool HistoryMessage::allowsEdit(TimeId now) const {
|
||||||
}();
|
}();
|
||||||
const auto messageTooOld = (messageToMyself || canPinInMegagroup)
|
const auto messageTooOld = (messageToMyself || canPinInMegagroup)
|
||||||
? false
|
? false
|
||||||
: (now >= date() + Global::EditTimeLimit());
|
: (now - date() >= Global::EditTimeLimit());
|
||||||
if (id < 0 || messageTooOld) {
|
if (id < 0 || messageTooOld) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue