kopia lustrzana https://github.com/nextcloud/social
commit
ca6e1e6c58
|
@ -244,7 +244,9 @@ class StreamRequestBuilder extends CoreRequestBuilder {
|
|||
// all possible follow, but linked by followers (actor_id) and accepted follow
|
||||
$crossFollows = $expr->andX();
|
||||
$crossFollows->add($recipientFields);
|
||||
$crossFollows->add($this->exprLimitToDBField($qb, 'actor_id', $actor->getId(),true, false, 'f'));
|
||||
$crossFollows->add(
|
||||
$this->exprLimitToDBField($qb, 'actor_id', $actor->getId(), true, false, 'f')
|
||||
);
|
||||
$crossFollows->add($this->exprLimitToDBFieldInt($qb, 'accepted', 1, 'f'));
|
||||
$on->add($crossFollows);
|
||||
|
||||
|
@ -421,6 +423,10 @@ class StreamRequestBuilder extends CoreRequestBuilder {
|
|||
* @throws SocialAppConfigException
|
||||
*/
|
||||
protected function parseStreamSelectSql(array $data, string $as = Stream::TYPE): Stream {
|
||||
if ($as === Stream::TYPE) {
|
||||
$as = $this->get('type', $data, Stream::TYPE);
|
||||
}
|
||||
|
||||
/** @var Stream $item */
|
||||
$item = AP::$activityPub->getItemFromType($as);
|
||||
$item->importFromDatabase($data);
|
||||
|
|
|
@ -34,6 +34,7 @@ use Exception;
|
|||
use JsonSerializable;
|
||||
use OCA\Social\AP;
|
||||
use OCA\Social\Exceptions\InvalidResourceEntryException;
|
||||
use OCA\Social\Exceptions\ItemAlreadyExistsException;
|
||||
use OCA\Social\Exceptions\ItemUnknownException;
|
||||
use OCA\Social\Model\ActivityPub\ACore;
|
||||
use OCA\Social\Model\ActivityPub\Stream;
|
||||
|
@ -121,6 +122,8 @@ class Note extends Stream implements JsonSerializable {
|
|||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
* @throws ItemAlreadyExistsException
|
||||
*/
|
||||
public function import(array $data) {
|
||||
parent::import($data);
|
||||
|
@ -131,6 +134,8 @@ class Note extends Stream implements JsonSerializable {
|
|||
|
||||
/**
|
||||
* @param array $list
|
||||
*
|
||||
* @throws ItemAlreadyExistsException
|
||||
*/
|
||||
public function importAttachments(array $list) {
|
||||
$new = [];
|
||||
|
|
Ładowanie…
Reference in New Issue