X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fitem.php;h=7d9cdb0286b6e4772c2d438cf0cde3b283de9b23;hb=60af1314a0ce1e5a9cfa0ad933de6dcee212ddf5;hp=1309dce47e451e010ed0355a9030525f491de13c;hpb=2f1f6f6fb2c155a02270a20b2955e063152244b3;p=friendica.git diff --git a/mod/item.php b/mod/item.php index 1309dce47e..7d9cdb0286 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1,6 +1,6 @@ ')) { - $private_forum = false; - $only_to_forum = true; - $private_id = $success['contact']['id']; - $forum_contact = $success['contact']; + + if ($success = ItemHelper::replaceTag($body, $inform, local_user() ? local_user() : $profile_uid, $tag, $network)) { + if ($success['replaced']) { + $tagged[] = $tag; + } + // When the forum is private or the forum is addressed with a "!" make the post private + if (!empty($success['contact']['prv']) || ($tag_type == Tag::TAG_CHARACTER[Tag::EXCLUSIVE_MENTION])) { + $private_forum = $success['contact']['prv']; + $only_to_forum = ($tag_type == Tag::TAG_CHARACTER[Tag::EXCLUSIVE_MENTION]); + $private_id = $success['contact']['id']; + $forum_contact = $success['contact']; + } elseif (!empty($success['contact']['forum']) && ($str_contact_allow == '<' . $success['contact']['id'] . '>')) { + $private_forum = false; + $only_to_forum = true; + $private_id = $success['contact']['id']; + $forum_contact = $success['contact']; + } } } - } - return $body; - }); + return $body; + }); + } $original_contact_id = $contact_id;