kopia lustrzana https://github.com/nextcloud/social
rodzic
63a1107178
commit
8382f1a9c3
|
|
@ -191,7 +191,7 @@ class LocalController extends Controller {
|
|||
*
|
||||
* @return DataResponse
|
||||
*/
|
||||
public function streamHome(int $since = 0, int $limit = 5): DataResponse {
|
||||
public function streamHome($since = 0, int $limit = 5): DataResponse {
|
||||
|
||||
try {
|
||||
$actor = $this->actorService->getActorFromUserId($this->userId);
|
||||
|
|
|
|||
|
|
@ -149,7 +149,10 @@ class NoteService implements ICoreService {
|
|||
case self::TYPE_UNLISTED:
|
||||
$note->setTo($actor->getFollowers());
|
||||
$note->addInstancePath(
|
||||
new InstancePath($actor->getFollowers(), InstancePath::TYPE_FOLLOWERS, InstancePath::PRIORITY_LOW)
|
||||
new InstancePath(
|
||||
$actor->getFollowers(), InstancePath::TYPE_FOLLOWERS,
|
||||
InstancePath::PRIORITY_LOW
|
||||
)
|
||||
);
|
||||
$note->addCc(ActivityService::TO_PUBLIC);
|
||||
break;
|
||||
|
|
@ -157,7 +160,10 @@ class NoteService implements ICoreService {
|
|||
case self::TYPE_FOLLOWERS:
|
||||
$note->setTo($actor->getFollowers());
|
||||
$note->addInstancePath(
|
||||
new InstancePath($actor->getFollowers(), InstancePath::TYPE_FOLLOWERS, InstancePath::PRIORITY_LOW)
|
||||
new InstancePath(
|
||||
$actor->getFollowers(), InstancePath::TYPE_FOLLOWERS,
|
||||
InstancePath::PRIORITY_LOW
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
||||
|
|
@ -168,7 +174,10 @@ class NoteService implements ICoreService {
|
|||
$note->setTo(ActivityService::TO_PUBLIC);
|
||||
$note->addCc($actor->getFollowers());
|
||||
$note->addInstancePath(
|
||||
new InstancePath($actor->getFollowers(), InstancePath::TYPE_FOLLOWERS, InstancePath::PRIORITY_LOW)
|
||||
new InstancePath(
|
||||
$actor->getFollowers(), InstancePath::TYPE_FOLLOWERS,
|
||||
InstancePath::PRIORITY_LOW
|
||||
)
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
|
@ -191,7 +200,9 @@ class NoteService implements ICoreService {
|
|||
return;
|
||||
}
|
||||
|
||||
$instancePath = new InstancePath($actor->getInbox(), InstancePath::TYPE_INBOX, InstancePath::PRIORITY_MEDIUM);
|
||||
$instancePath = new InstancePath(
|
||||
$actor->getInbox(), InstancePath::TYPE_INBOX, InstancePath::PRIORITY_MEDIUM
|
||||
);
|
||||
if ($type === self::TYPE_DIRECT) {
|
||||
$instancePath->setPriority(InstancePath::PRIORITY_HIGH);
|
||||
$note->addToArray($actor->getId());
|
||||
|
|
@ -237,7 +248,9 @@ class NoteService implements ICoreService {
|
|||
|
||||
$note->setInReplyTo($replyTo);
|
||||
// TODO - type can be NOT public !
|
||||
$note->addInstancePath(new InstancePath($replyTo, InstancePath::TYPE_PUBLIC, InstancePath::PRIORITY_HIGH));
|
||||
$note->addInstancePath(
|
||||
new InstancePath($replyTo, InstancePath::TYPE_PUBLIC, InstancePath::PRIORITY_HIGH)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue