kopia lustrzana https://github.com/nextcloud/social
commit
07dcffca3c
|
@ -242,7 +242,7 @@ class CacheActorsRequest extends CacheActorsRequestBuilder {
|
|||
$cursor->closeCursor();
|
||||
|
||||
if ($data === false) {
|
||||
throw new CacheActorDoesNotExistException();
|
||||
throw new CacheActorDoesNotExistException('Unknown account \'' . $account . "'");
|
||||
}
|
||||
|
||||
return $this->parseCacheActorsSelectSql($data);
|
||||
|
|
|
@ -133,7 +133,9 @@ class StreamRequest extends StreamRequestBuilder {
|
|||
$cursor->closeCursor();
|
||||
|
||||
if ($data === false) {
|
||||
throw new StreamNotFoundException('Stream not found');
|
||||
throw new StreamNotFoundException(
|
||||
'Stream (ById) not found - ' . $id . ' (asViewer: ' . $asViewer . ')'
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -166,7 +168,7 @@ class StreamRequest extends StreamRequestBuilder {
|
|||
$cursor->closeCursor();
|
||||
|
||||
if ($data === false) {
|
||||
throw new StreamNotFoundException('Stream not found');
|
||||
throw new StreamNotFoundException('Stream (ByActivityId) not found - ' . $id);
|
||||
}
|
||||
|
||||
return $this->parseStreamSelectSql($data);
|
||||
|
|
|
@ -35,7 +35,6 @@ use Doctrine\DBAL\Query\QueryBuilder;
|
|||
use OCA\Social\Exceptions\InvalidResourceException;
|
||||
use OCA\Social\Model\ActivityPub\ACore;
|
||||
use OCA\Social\Model\ActivityPub\Actor\Person;
|
||||
use OCA\Social\Model\ActivityPub\Object\Note;
|
||||
use OCA\Social\Model\ActivityPub\Stream;
|
||||
use OCA\Social\Model\InstancePath;
|
||||
use OCP\DB\QueryBuilder\ICompositeExpression;
|
||||
|
@ -113,8 +112,6 @@ class StreamRequestBuilder extends CoreRequestBuilder {
|
|||
$qb->selectAlias($qb->createFunction('COUNT(*)'), 'count')
|
||||
->from(self::TABLE_STREAMS, 's');
|
||||
|
||||
$this->limitToType($qb, Note::TYPE);
|
||||
|
||||
$this->defaultSelectAlias = 's';
|
||||
|
||||
return $qb;
|
||||
|
|
|
@ -54,17 +54,17 @@ if ($type !== 'acct') {
|
|||
|
||||
|
||||
list($username, $instance) = explode('@', $account);
|
||||
|
||||
try {
|
||||
$cacheActorService = OC::$server->query(CacheActorService::class);
|
||||
$configService = OC::$server->query(ConfigService::class);
|
||||
|
||||
if ($configService->getCloudAddress(true) !== $instance) {
|
||||
throw new Exception();
|
||||
throw new Exception('instance is ' . $instance . ', expected ' . $configService->getCloudAddress(true));
|
||||
}
|
||||
|
||||
$cacheActorService->getFromLocalAccount($username);
|
||||
} catch (Exception $e) {
|
||||
OC::$server->getLogger()->log(1, 'Exception on webfinger - ' . $e->getMessage());
|
||||
http_response_code(404);
|
||||
exit;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue