diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2018-11-27 15:55:24 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2018-11-27 15:55:24 -0100 |
commit | bb06cc1063312a7233aab0545ecacf864ee6410d (patch) | |
tree | e7806830f6a3f8bd3b5a103532b0c5eaddc9d098 /lib/Db | |
parent | bd1e0ee244289dea63462654d7d41eeb708ec02e (diff) |
add Type to cached actor
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Db')
-rw-r--r-- | lib/Db/ActorsRequestBuilder.php | 1 | ||||
-rw-r--r-- | lib/Db/CacheActorsRequest.php | 1 | ||||
-rw-r--r-- | lib/Db/CacheActorsRequestBuilder.php | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/lib/Db/ActorsRequestBuilder.php b/lib/Db/ActorsRequestBuilder.php index 5cf283cb..8d3e0dfc 100644 --- a/lib/Db/ActorsRequestBuilder.php +++ b/lib/Db/ActorsRequestBuilder.php @@ -113,6 +113,7 @@ class ActorsRequestBuilder extends CoreRequestBuilder { $actor = new Person(); $actor->importFromDatabase($data); + $actor->setType('Person'); $actor->setInbox($actor->getId() . '/inbox') ->setOutbox($actor->getId() . '/outbox') ->setFollowers($actor->getId() . '/followers') diff --git a/lib/Db/CacheActorsRequest.php b/lib/Db/CacheActorsRequest.php index dd3d9489..b8f154e7 100644 --- a/lib/Db/CacheActorsRequest.php +++ b/lib/Db/CacheActorsRequest.php @@ -69,6 +69,7 @@ class CacheActorsRequest extends CacheActorsRequestBuilder { $qb = $this->getCacheActorsInsertSql(); $qb->setValue('id', $qb->createNamedParameter($actor->getId())) ->setValue('account', $qb->createNamedParameter($actor->getAccount())) + ->setValue('type', $qb->createNamedParameter($actor->getType())) ->setValue('local', $qb->createNamedParameter(($actor->isLocal()) ? '1' : '0')) ->setValue('following', $qb->createNamedParameter($actor->getFollowing())) ->setValue('followers', $qb->createNamedParameter($actor->getFollowers())) diff --git a/lib/Db/CacheActorsRequestBuilder.php b/lib/Db/CacheActorsRequestBuilder.php index 3d6847d1..1d6e9668 100644 --- a/lib/Db/CacheActorsRequestBuilder.php +++ b/lib/Db/CacheActorsRequestBuilder.php @@ -78,7 +78,7 @@ class CacheActorsRequestBuilder extends CoreRequestBuilder { /** @noinspection PhpMethodParametersCountMismatchInspection */ $qb->select( 'ca.id', 'ca.account', 'ca.following', 'ca.followers', 'ca.inbox', - 'ca.shared_inbox', 'ca.outbox', 'ca.featured', 'ca.url', + 'ca.shared_inbox', 'ca.outbox', 'ca.featured', 'ca.url', 'ca.type', 'ca.preferred_username', 'ca.name', 'ca.summary', 'ca.public_key', 'ca.local', 'ca.source', 'ca.creation' ) |