} elseif (($contact["rel"] == Contact::SHARING) || ($contact["rel"] == Contact::FRIEND)) {
// Yes, then it is fine.
return true;
- // Is it a post to a community?
- } elseif (($contact["rel"] == Contact::FOLLOWER) && in_array($importer["page-flags"], [User::PAGE_FLAGS_COMMUNITY, User::PAGE_FLAGS_PRVGROUP])) {
- // That's good
- return true;
// Is the message a global user or a comment?
} elseif (($importer["uid"] == 0) || $is_comment) {
// Messages for the global users and comments are always accepted
private static function prependParentAuthorMention($body, $profile_url)
{
- $profile = Contact::getByURL($profile_url, false, ['addr', 'name', 'contact-type']);
+ $profile = Contact::getByURL($profile_url, false, ['addr', 'name']);
if (!empty($profile['addr'])
- && $profile['contact-type'] != Contact::TYPE_COMMUNITY
&& !strstr($body, $profile['addr'])
&& !strstr($body, $profile_url)
) {