Add the mentions

This commit is contained in:
Michael 2022-02-18 09:12:33 +00:00
parent ebb4c0f947
commit 39724d5079
2 changed files with 2 additions and 2 deletions

View file

@ -1474,7 +1474,7 @@ class Item
} }
// When the post belongs to a a forum then all forum users are allowed to access it // When the post belongs to a a forum then all forum users are allowed to access it
foreach (Tag::getByURIId($uriid, [Tag::EXCLUSIVE_MENTION]) as $tag) { foreach (Tag::getByURIId($uriid, [Tag::MENTION, Tag::EXCLUSIVE_MENTION]) as $tag) {
if (DBA::exists('contact', ['uid' => $uid, 'nurl' => Strings::normaliseLink($tag['url']), 'contact-type' => Contact::TYPE_COMMUNITY])) { if (DBA::exists('contact', ['uid' => $uid, 'nurl' => Strings::normaliseLink($tag['url']), 'contact-type' => Contact::TYPE_COMMUNITY])) {
$target_uid = User::getIdForURL($tag['url']); $target_uid = User::getIdForURL($tag['url']);
if (!empty($target_uid)) { if (!empty($target_uid)) {

View file

@ -730,7 +730,7 @@ class Notifier
$uid = $target_item['contact-uid'] ?: $target_item['uid']; $uid = $target_item['contact-uid'] ?: $target_item['uid'];
// Update the locally stored follower list when we deliver to a forum // Update the locally stored follower list when we deliver to a forum
foreach (Tag::getByURIId($target_item['uri-id'], [Tag::EXCLUSIVE_MENTION]) as $tag) { foreach (Tag::getByURIId($target_item['uri-id'], [Tag::MENTION, Tag::EXCLUSIVE_MENTION]) as $tag) {
$target_contact = Contact::getByURL(Strings::normaliseLink($tag['url']), null, [], $uid); $target_contact = Contact::getByURL(Strings::normaliseLink($tag['url']), null, [], $uid);
if (($target_contact['contact-type'] == Contact::TYPE_COMMUNITY) && $target_contact['manually-approve']) { if (($target_contact['contact-type'] == Contact::TYPE_COMMUNITY) && $target_contact['manually-approve']) {
Group::updateMembersForForum($target_contact['id']); Group::updateMembersForForum($target_contact['id']);