return $contact;
}
- public static function addRelationship($importer, $contact, $datarray, $item = '', $sharing = false) {
+ public static function addRelationship($importer, $contact, $datarray, $item = '', $sharing = false, $note = '') {
// Should always be set
if (empty($datarray['author-id'])) {
return;
if (is_array($contact_record)) {
DBA::insert('intro', ['uid' => $importer['uid'], 'contact-id' => $contact_record['id'],
- 'blocked' => false, 'knowyou' => false,
+ 'blocked' => false, 'knowyou' => false, 'note' => $note,
'hash' => $hash, 'datetime' => DateTimeFormat::utcNow()]);
}
$item = ['author-id' => Contact::getIdForURL($activity['actor']),
'author-link' => $activity['actor']];
+ $note = Strings::escapeTags(trim(defaults($activity, 'content', '')));
+
// Ensure that the contact has got the right network type
self::switchContact($item['author-id']);
- Contact::addRelationship($owner, $contact, $item);
+ Contact::addRelationship($owner, $contact, $item, '', false, $note);
$cid = Contact::getIdForURL($activity['actor'], $uid);
if (empty($cid)) {
return;