Display interaction data for Diaspora accounts

This commit is contained in:
Michael 2021-12-30 22:11:52 +00:00
parent 5a07068049
commit 29be22ee6a
7 changed files with 72 additions and 35 deletions

View file

@ -211,6 +211,19 @@ class Contact
return DBA::selectFirst('contact', $fields, ['id' => $id]);
}
/**
* Fetch the first contact with the provided uri-id.
*
* @param integer $uri_id uri-id of the contact
* @param array $fields Array of selected fields, empty for all
* @return array|boolean Contact record if it exists, false otherwise
* @throws \Exception
*/
public static function getByUriId($uri_id, $fields = [])
{
return DBA::selectFirst('contact', $fields, ['uri-id' => $uri_id], ['order' => ['uid']]);
}
/**
* Fetches a contact by a given url
*