removed unneeded notification check

This commit is contained in:
Michael 2020-08-12 04:43:46 +00:00
parent 4ee858740e
commit 26df7595ac

View file

@ -2018,14 +2018,7 @@ class Item
if (!empty($contact['id'])) { if (!empty($contact['id'])) {
$condition = ['uri-id' => $item['parent-uri-id'], 'uid' => $item['uid']]; $condition = ['uri-id' => $item['parent-uri-id'], 'uid' => $item['uid']];
Item::update(['owner-id' => $item['author-id'], 'contact-id' => $contact['id']], $condition); Item::update(['owner-id' => $item['author-id'], 'contact-id' => $contact['id']], $condition);
$forum_item = Item::selectFirst(['id'], $condition); Logger::info('Convert message into a forum message', ['uri-id' => $item['uri-id'], 'parent-uri-id' => $item['parent-uri-id'], 'uid' => $item['uid'], 'owner-id' => $item['author-id'], 'contact-id' => $contact['id']]);
if (!empty($forum_item['id'])) {
// This will trigger notifications like "X shared a new post"
UserItem::setNotification($forum_item['id']);
check_user_notification($forum_item['id']);
}
LOgger::info('Convert message into a forum message', ['uri-id' => $item['uri-id'], 'parent-uri-id' => $item['parent-uri-id'], 'uid' => $item['uid'], 'owner-id' => $item['author-id'], 'contact-id' => $contact['id']]);
} }
} }