diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 1eb133986..e7a6b529d 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -133,6 +133,7 @@ class Contact const FOLLOWER = 1; const SHARING = 2; const FRIEND = 3; + const SELF = 4; /** * @} */ diff --git a/src/Model/Contact/User.php b/src/Model/Contact/User.php index 52904925f..85399951c 100644 --- a/src/Model/Contact/User.php +++ b/src/Model/Contact/User.php @@ -72,6 +72,10 @@ class User $fields['ignored'] = $fields['readonly']; } + if (!empty($fields['self'])) { + $fields['rel'] = Contact::SELF; + } + $fields = DBStructure::getFieldsForTable('user-contact', $fields); $fields['cid'] = $pcid; $fields['uid'] = $contact['uid']; @@ -105,6 +109,10 @@ class User $fields['ignored'] = $fields['readonly']; } + if (!empty($fields['self'])) { + $fields['rel'] = Contact::SELF; + } + $update_fields = DBStructure::getFieldsForTable('user-contact', $fields); if (!empty($update_fields)) { $contacts = DBA::select('contact', ['uri-id', 'uid'], $condition);