Merge pull request #12799 from HankG/fix-mastodon-friend-requests-ids

Change FollowRequest to return the user ID so is compatible with POST endpoint
This commit is contained in:
Hypolite Petovan 2023-02-17 18:09:26 -05:00 committed by GitHub
commit 6d38b44b97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 120 deletions

View file

@ -105,8 +105,10 @@ class FollowRequests extends BaseApi
foreach ($introductions as $key => $introduction) {
try {
self::setBoundaries($introduction->id);
$return[] = DI::mstdnFollowRequest()->createFromIntroduction($introduction);
} catch (HTTPException\InternalServerErrorException $exception) {
$return[] = DI::mstdnAccount()->createFromContactId($introduction->cid, $introduction->uid);
} catch (HTTPException\InternalServerErrorException
| HTTPException\NotFoundException
| \ImagickException $exception) {
DI::intro()->delete($introduction);
unset($introductions[$key]);
}