Move Contact::ACCOUNT_TYPE_* constants to User::ACCOUNT_TYPE_*

- Keep Contact::TYPE_* constants for comparison with contact.contact-type
This commit is contained in:
Hypolite Petovan 2019-01-06 17:08:35 -05:00
parent ad9c67663d
commit 3d839bb176
12 changed files with 79 additions and 44 deletions

View file

@ -301,7 +301,7 @@ class Delivery extends BaseObject
// Se we transmit with the new method and via Diaspora as a fallback
if (!empty($items) && (($items[0]['uid'] == 0) || ($contact['uid'] == 0))) {
// Transmit in public if it's a relay post
$public_dfrn = ($contact['contact-type'] == Contact::ACCOUNT_TYPE_RELAY);
$public_dfrn = ($contact['contact-type'] == Contact::TYPE_RELAY);
$deliver_status = DFRN::transmit($owner, $contact, $atom, $public_dfrn);
@ -359,7 +359,7 @@ class Delivery extends BaseObject
private static function deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup)
{
// We don't treat Forum posts as "wall-to-wall" to be able to post them via Diaspora
$walltowall = $top_level && ($owner['id'] != $items[0]['contact-id']) & ($owner['account-type'] != Contact::ACCOUNT_TYPE_COMMUNITY);
$walltowall = $top_level && ($owner['id'] != $items[0]['contact-id']) & ($owner['account-type'] != User::ACCOUNT_TYPE_COMMUNITY);
if ($public_message) {
$loc = 'public batch ' . $contact['batch'];