kopia lustrzana https://github.com/nextcloud/social
catch missing actor
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/1658/head
rodzic
eace45befb
commit
044c738989
|
@ -34,6 +34,7 @@ use Exception;
|
|||
use OCA\Social\AP;
|
||||
use OCA\Social\Db\ActorsRequest;
|
||||
use OCA\Social\Db\CacheActorsRequest;
|
||||
use OCA\Social\Exceptions\ActorDoesNotExistException;
|
||||
use OCA\Social\Exceptions\CacheActorDoesNotExistException;
|
||||
use OCA\Social\Exceptions\InvalidOriginException;
|
||||
use OCA\Social\Exceptions\InvalidResourceException;
|
||||
|
@ -177,6 +178,7 @@ class CacheActorService {
|
|||
* @return Person
|
||||
* @throws CacheActorDoesNotExistException
|
||||
* @throws SocialAppConfigException
|
||||
* @throws ActorDoesNotExistException
|
||||
*/
|
||||
public function getFromLocalAccount(string $account): Person {
|
||||
$instance = '';
|
||||
|
|
|
@ -26,6 +26,7 @@ declare(strict_types=1);
|
|||
namespace OCA\Social\WellKnown;
|
||||
|
||||
use OCA\Social\Db\CacheActorsRequest;
|
||||
use OCA\Social\Exceptions\ActorDoesNotExistException;
|
||||
use OCA\Social\Exceptions\CacheActorDoesNotExistException;
|
||||
use OCA\Social\Exceptions\SocialAppConfigException;
|
||||
use OCA\Social\Exceptions\UnauthorizedFediverseException;
|
||||
|
@ -109,7 +110,7 @@ class WebfingerHandler implements IHandler {
|
|||
$actor = null;
|
||||
try {
|
||||
$actor = $this->cacheActorService->getFromLocalAccount($subject);
|
||||
} catch (SocialAppConfigException $e) {
|
||||
} catch (ActorDoesNotExistException | SocialAppConfigException $e) {
|
||||
return null;
|
||||
} catch (CacheActorDoesNotExistException $e) {
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue