kopia lustrzana https://github.com/nextcloud/social
add Type to cached actor
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/58/head
rodzic
bd1e0ee244
commit
bb06cc1063
|
@ -268,6 +268,13 @@
|
|||
<primary>true</primary>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<name>type</name>
|
||||
<type>text</type>
|
||||
<length>31</length>
|
||||
<notnull>true</notnull>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<name>account</name>
|
||||
<type>text</type>
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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()))
|
||||
|
|
|
@ -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'
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue