Another preparation for forum posts via AP

This commit is contained in:
Michael 2019-01-28 06:23:06 +00:00
parent 0872fe746a
commit 030c0b5dc6
2 changed files with 38 additions and 14 deletions

View file

@ -603,15 +603,20 @@ class Notifier
return false;
}
return self::isForum($item['contact-id']);
}
private static function isForum($contactid)
{
$fields = ['forum', 'prv'];
$condition = ['id' => $item['contact-id']];
$condition = ['id' => $contactid];
$contact = DBA::selectFirst('contact', $fields, $condition);
if (!DBA::isResult($contact)) {
// Should never happen
return false;
}
// Is the post from a forum?
// Is it a forum?
return ($contact['forum'] || $contact['prv']);
}
}