$uid = $item['uid'] ?: $uid;
- if (!Post\Category::existsForURIId($item['uri-id'], $uid)) {
+ if (empty($item['has-categories'])) {
return [$categories, $folders];
}
// Search for forum mentions
foreach (Tag::getFromBody($item['body'], Tag::TAG_CHARACTER[Tag::MENTION] . Tag::TAG_CHARACTER[Tag::EXCLUSIVE_MENTION]) as $tag) {
$contact = Contact::getByURLForUser($tag[2], $item['uid']);
+ if (empty($contact)) {
+ continue;
+ }
$receivers[] = $contact['id'];