kopia lustrzana https://github.com/nextcloud/social
commit
dc55d5ef12
|
@ -630,7 +630,7 @@ class Stream extends ACore implements IQueryRow, JsonSerializable {
|
|||
"content" => $this->getContent(),
|
||||
"sensitive" => $this->isSensitive(),
|
||||
"spoiler_text" => $this->getSpoilerText(),
|
||||
'visibility' => ($this->getVisibility() === '') ? 'unknown' : $this->getVisibility(),
|
||||
'visibility' => $this->getVisibility(),
|
||||
"language" => $this->getLanguage(),
|
||||
"in_reply_to_id" => null,
|
||||
"in_reply_to_account_id" => null,
|
||||
|
|
|
@ -139,7 +139,10 @@ class ActionService {
|
|||
}
|
||||
|
||||
private function reblog(Person $actor, string $postId, bool $enabled = true): void {
|
||||
$this->boostService->create($actor, $postId);
|
||||
//$this->streamActionService->setActionBool($actor->getId(), $postId, StreamAction::BOOSTED, $enabled);
|
||||
if ($enabled) {
|
||||
$this->boostService->create($actor, $postId);
|
||||
} else {
|
||||
$this->boostService->delete($actor, $postId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ class BoostService {
|
|||
* @throws SocialAppConfigException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function create(Person $actor, string $postId, &$token = ''): ACore {
|
||||
public function create(Person $actor, string $postId, string &$token = ''): ACore {
|
||||
/** @var Announce $announce */
|
||||
$announce = AP::$activityPub->getItemFromType(Announce::TYPE);
|
||||
$this->streamService->assignItem($announce, $actor, Stream::TYPE_ANNOUNCE);
|
||||
|
@ -169,7 +169,7 @@ class BoostService {
|
|||
* @throws SocialAppConfigException
|
||||
* @throws StreamNotFoundException
|
||||
*/
|
||||
public function delete(Person $actor, string $postId, &$token = ''): ACore {
|
||||
public function delete(Person $actor, string $postId, string &$token = ''): ACore {
|
||||
$undo = new Undo();
|
||||
$this->streamService->assignItem($undo, $actor, Stream::TYPE_PUBLIC);
|
||||
$undo->setActor($actor);
|
||||
|
@ -188,7 +188,7 @@ class BoostService {
|
|||
|
||||
$interface = AP::$activityPub->getInterfaceFromType(Announce::TYPE);
|
||||
$interface->delete($announce);
|
||||
// $this->streamRequest->deleteStreamById($announce->getId(), Announce::TYPE);
|
||||
$this->streamRequest->deleteById($announce->getId(), Announce::TYPE);
|
||||
$this->signatureService->signObject($actor, $undo);
|
||||
|
||||
$token = $this->activityService->request($undo);
|
||||
|
|
Ładowanie…
Reference in New Issue