Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/61/head
Maxence Lange 2018-11-28 10:05:30 -01:00
rodzic 63a1107178
commit 8382f1a9c3
2 zmienionych plików z 19 dodań i 6 usunięć

Wyświetl plik

@ -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);

Wyświetl plik

@ -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)
);
}