IcingaDB#SendRemovedComment(): ignore ack comments like #SendAddedComment()

Icinga DB doesn't expect comment history for ack comments.

Before:

1. Acked checkable recovers
2. Icinga clears ack comments w/o setting removal time
3. Icinga DB gets neither removal time, nor expire time
4. Icinga DB falls back to NULL and violates NOT NULL constraint
This commit is contained in:
Alexander A. Klimov 2022-03-21 17:06:35 +01:00
parent b4fd4c6131
commit 27966c3c08
1 changed files with 1 additions and 1 deletions

View File

@ -2022,7 +2022,7 @@ void IcingaDB::SendAddedComment(const Comment::Ptr& comment)
void IcingaDB::SendRemovedComment(const Comment::Ptr& comment)
{
if (!GetActive()) {
if (comment->GetEntryType() != CommentUser || !GetActive()) {
return;
}