kopia lustrzana https://github.com/nextcloud/social
rodzic
eefada0e39
commit
923bb732bd
|
@ -30,7 +30,6 @@ declare(strict_types=1);
|
|||
namespace OCA\Social\Service;
|
||||
|
||||
|
||||
use daita\MySmallPhpTools\Exceptions\MalformedArrayException;
|
||||
use daita\MySmallPhpTools\Model\Request;
|
||||
use daita\MySmallPhpTools\Traits\TArrayTools;
|
||||
use Exception;
|
||||
|
@ -42,7 +41,6 @@ use OCA\Social\Exceptions\EmptyQueueException;
|
|||
use OCA\Social\Exceptions\InvalidResourceException;
|
||||
use OCA\Social\Exceptions\NoHighPriorityRequestException;
|
||||
use OCA\Social\Exceptions\QueueStatusException;
|
||||
use OCA\Social\Exceptions\RedundancyLimitException;
|
||||
use OCA\Social\Exceptions\Request410Exception;
|
||||
use OCA\Social\Exceptions\RequestException;
|
||||
use OCA\Social\Exceptions\SocialAppConfigException;
|
||||
|
@ -191,7 +189,7 @@ class ActivityService {
|
|||
}
|
||||
|
||||
$requests = [
|
||||
'Note'
|
||||
'Note'
|
||||
];
|
||||
|
||||
foreach ($requests as $request) {
|
||||
|
|
|
@ -34,10 +34,6 @@ use daita\MySmallPhpTools\Traits\TArrayTools;
|
|||
use OCA\Social\Db\CacheActorsRequest;
|
||||
use OCA\Social\Db\CacheDocumentsRequest;
|
||||
use OCA\Social\Exceptions\CacheDocumentDoesNotExistException;
|
||||
use OCA\Social\Exceptions\InvalidResourceEntryException;
|
||||
use OCA\Social\Exceptions\InvalidResourceException;
|
||||
use OCA\Social\Exceptions\SocialAppConfigException;
|
||||
use OCA\Social\Exceptions\UrlCloudException;
|
||||
use OCA\Social\Model\ActivityPub\Actor\Person;
|
||||
|
||||
|
||||
|
@ -215,30 +211,30 @@ class ActorService {
|
|||
// return $this->cacheActorsRequest->getFromLocalAccount($account);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* @param array $object
|
||||
*
|
||||
* @return Person
|
||||
* @throws InvalidResourceException
|
||||
* @throws SocialAppConfigException
|
||||
* @throws UrlCloudException
|
||||
* @throws InvalidResourceEntryException
|
||||
*/
|
||||
private function generateActorFromObject(array $object) {
|
||||
|
||||
$actor = new Person();
|
||||
$actor->setUrlCloud($this->configService->getCloudAddress());
|
||||
$actor->import($object);
|
||||
|
||||
if ($actor->getType() !== Person::TYPE) {
|
||||
throw new InvalidResourceException();
|
||||
}
|
||||
|
||||
$actor->setSource(json_encode($object, JSON_UNESCAPED_SLASHES));
|
||||
|
||||
return $actor;
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * @param array $object
|
||||
// *
|
||||
// * @return Person
|
||||
// * @throws InvalidResourceException
|
||||
// * @throws SocialAppConfigException
|
||||
// * @throws UrlCloudException
|
||||
// * @throws InvalidResourceEntryException
|
||||
// */
|
||||
// private function generateActorFromObject(array $object) {
|
||||
//
|
||||
// $actor = new Person();
|
||||
// $actor->setUrlCloud($this->configService->getCloudAddress());
|
||||
// $actor->import($object);
|
||||
//
|
||||
// if ($actor->getType() !== Person::TYPE) {
|
||||
// throw new InvalidResourceException();
|
||||
// }
|
||||
//
|
||||
// $actor->setSource(json_encode($object, JSON_UNESCAPED_SLASHES));
|
||||
//
|
||||
// return $actor;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * @param string $search
|
||||
|
|
Ładowanie…
Reference in New Issue