diff --git a/src/huggle_core/message.cpp b/src/huggle_core/message.cpp index 29abe69e6..700b39bf6 100644 --- a/src/huggle_core/message.cpp +++ b/src/huggle_core/message.cpp @@ -231,6 +231,9 @@ void Message::Finish() // write something to talk page in case it was empty if (this->User->TalkPage_GetContents().isEmpty()) this->User->TalkPage_SetContents(this->Text); + // update last message time + this->User->SetLastMessageTime(QDateTime::currentDateTime()); + this->User->Update(true); } } } diff --git a/src/huggle_core/warnings.cpp b/src/huggle_core/warnings.cpp index 370f811bb..b49f95ff8 100644 --- a/src/huggle_core/warnings.cpp +++ b/src/huggle_core/warnings.cpp @@ -138,7 +138,9 @@ PendingWarning *Warnings::WarnUser(const QString& warning_type, RevertQuery *dep } edit->User->IncrementWarningLevel(); - edit->User->SetLastMessageTime(QDateTime::currentDateTime()); + // This must not be here, many warnings fail due to expired talk page and are re-sent + // if we set last message time here, sending after reparse will fail due to that + //edit->User->SetLastMessageTime(QDateTime::currentDateTime()); // We need to update the user so that new user warning level gets propagated everywhere on interface of huggle edit->User->Update(); diff --git a/src/huggle_core/wikiuser.cpp b/src/huggle_core/wikiuser.cpp index ae03b8439..31bf74544 100644 --- a/src/huggle_core/wikiuser.cpp +++ b/src/huggle_core/wikiuser.cpp @@ -499,7 +499,7 @@ void WikiUser::SetLastMessageTime(const QDateTime &date_time) { if (this->LastMessageTimeKnown && this->LastMessageTime > date_time) { - HUGGLE_DEBUG1(this->GetSite()->Name + ": user " + this->Username + " had LastWarningTime changed to past"); + HUGGLE_DEBUG1(this->GetSite()->Name + ": user " + this->Username + " had LastWarningTime changed to past by " + QString::number(date_time.secsTo(this->LastMessageTime)) + " seconds"); } this->LastMessageTimeKnown = true;