]> git.mxchange.org Git - friendica.git/blob - src/Object/Api/Mastodon/FollowRequest.php
Merge pull request #8191 from MrPetovan/task/7967-mastodon-api-custom_emojis
[friendica.git] / src / Object / Api / Mastodon / FollowRequest.php
1 <?php
2
3 namespace Friendica\Object\Api\Mastodon;
4
5 use Friendica\App\BaseURL;
6
7 /**
8  * Virtual entity to separate Accounts from Follow Requests.
9  * In the Mastodon API they are one and the same.
10  */
11 class FollowRequest extends Account
12 {
13         /**
14          * Creates a follow request entity from an introduction record.
15          *
16          * The account ID is set to the Introduction ID to allow for later interaction with follow requests.
17          *
18          * @param BaseURL $baseUrl
19          * @param int     $introduction_id Introduction record id
20          * @param array   $publicContact   Full contact table record with uid = 0
21          * @param array   $apcontact       Optional full apcontact table record
22          * @param array   $userContact     Optional full contact table record with uid != 0
23          * @throws \Friendica\Network\HTTPException\InternalServerErrorException
24          */
25         public function __construct(BaseURL $baseUrl, int $introduction_id, array $publicContact, array $apcontact = [], array $userContact = [])
26         {
27                 parent::__construct($baseUrl, $publicContact, $apcontact, $userContact);
28
29                 $this->id = $introduction_id;
30         }
31 }