mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:50:15 +00:00
Move Contact::ACCOUNT_TYPE_* constants to User::ACCOUNT_TYPE_*
- Keep Contact::TYPE_* constants for comparison with contact.contact-type
This commit is contained in:
parent
ad9c67663d
commit
3d839bb176
12 changed files with 79 additions and 44 deletions
|
@ -503,13 +503,13 @@ class Receiver
|
|||
|
||||
// Check if the potential receiver is following the actor
|
||||
// Exception: The receiver is targetted via "to" or this is a comment
|
||||
if ((($element != 'as:to') && empty($replyto)) || ($contact['contact-type'] == Contact::ACCOUNT_TYPE_COMMUNITY)) {
|
||||
if ((($element != 'as:to') && empty($replyto)) || ($contact['contact-type'] == Contact::TYPE_COMMUNITY)) {
|
||||
$networks = [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
|
||||
$condition = ['nurl' => Strings::normaliseLink($actor), 'rel' => [Contact::SHARING, Contact::FRIEND],
|
||||
'network' => $networks, 'archive' => false, 'pending' => false, 'uid' => $contact['uid']];
|
||||
|
||||
// Forum posts are only accepted from forum contacts
|
||||
if ($contact['contact-type'] == Contact::ACCOUNT_TYPE_COMMUNITY) {
|
||||
if ($contact['contact-type'] == Contact::TYPE_COMMUNITY) {
|
||||
$condition['rel'] = [Contact::SHARING, Contact::FRIEND, Contact::FOLLOWER];
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ class Receiver
|
|||
|
||||
// When the possible receiver isn't a community, then it is no valid receiver
|
||||
$owner = User::getOwnerDataById($contact['uid']);
|
||||
if (empty($owner) || ($owner['contact-type'] != Contact::ACCOUNT_TYPE_COMMUNITY)) {
|
||||
if (empty($owner) || ($owner['contact-type'] != Contact::TYPE_COMMUNITY)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue