summaryrefslogtreecommitdiffstats
path: root/lib/Service/PushService.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/PushService.php')
-rw-r--r--lib/Service/PushService.php106
1 files changed, 53 insertions, 53 deletions
diff --git a/lib/Service/PushService.php b/lib/Service/PushService.php
index 78274d5a..7f2bffe4 100644
--- a/lib/Service/PushService.php
+++ b/lib/Service/PushService.php
@@ -31,12 +31,12 @@ declare(strict_types=1);
namespace OCA\Social\Service;
-use OCA\Social\Tools\Traits\TAsync;
use OC;
-//use OC\Push\Model\Helper\PushCallback;
use OCA\Social\Exceptions\SocialAppConfigException;
+//use OC\Push\Model\Helper\PushCallback;
use OCA\Social\Exceptions\StreamNotFoundException;
use OCA\Social\Model\ActivityPub\Actor\Person;
+use OCA\Social\Tools\Traits\TAsync;
use OCP\AppFramework\QueryException;
//use OCP\Push\Exceptions\PushInstallException;
@@ -68,13 +68,13 @@ class PushService {
$this->miscService = $miscService;
// FIX ME: nc18/push
-// if ($this->miscService->getNcVersion() >= 19) {
-// try {
-// $this->pushManager = OC::$server->query(IPushManager::class);
-// } catch (QueryException $e) {
-// $miscService->log('QueryException while loading IPushManager - ' . $e->getMessage());
-// }
-// }
+ // if ($this->miscService->getNcVersion() >= 19) {
+ // try {
+ // $this->pushManager = OC::$server->query(IPushManager::class);
+ // } catch (QueryException $e) {
+ // $miscService->log('QueryException while loading IPushManager - ' . $e->getMessage());
+ // }
+ // }
}
@@ -83,50 +83,50 @@ class PushService {
*/
public function onNewStream(string $streamId) {
return;
-// if ($this->miscService->getNcVersion() < 19) {
-// return;
-// }
-//
-// if (!$this->pushManager->isAvailable()) {
-// return;
-// }
-//
-// try {
-// $stream = $this->streamService->getStreamById($streamId);
-// } catch (StreamNotFoundException $e) {
-// return;
-// }
-//
-// try {
-// $pushHelper = $this->pushManager->getPushHelper();
-// $details = $this->detailsService->generateDetailsFromStream($stream);
-// } catch (PushInstallException $e) {
-// return;
-// } catch (SocialAppConfigException $e) {
-// return;
-// }
-//
-// $home = array_map(
-// function(Person $item): string {
-// return $item->getUserId();
-// }, $details->getHomeViewers()
-// );
-//
-// $callback = new PushCallback('social', 'timeline.home');
-// $callback->setPayloadSerializable($stream);
-// $callback->addUsers($home);
-// $pushHelper->toCallback($callback);
-//
-// $direct = array_map(
-// function(Person $item): string {
-// return $item->getUserId();
-// }, $details->getDirectViewers()
-// );
-//
-// $callback = new PushCallback('social', 'timeline.direct');
-// $callback->addUsers($direct);
-// $callback->setPayloadSerializable($stream);
-// $pushHelper->toCallback($callback);
+ // if ($this->miscService->getNcVersion() < 19) {
+ // return;
+ // }
+ //
+ // if (!$this->pushManager->isAvailable()) {
+ // return;
+ // }
+ //
+ // try {
+ // $stream = $this->streamService->getStreamById($streamId);
+ // } catch (StreamNotFoundException $e) {
+ // return;
+ // }
+ //
+ // try {
+ // $pushHelper = $this->pushManager->getPushHelper();
+ // $details = $this->detailsService->generateDetailsFromStream($stream);
+ // } catch (PushInstallException $e) {
+ // return;
+ // } catch (SocialAppConfigException $e) {
+ // return;
+ // }
+ //
+ // $home = array_map(
+ // function(Person $item): string {
+ // return $item->getUserId();
+ // }, $details->getHomeViewers()
+ // );
+ //
+ // $callback = new PushCallback('social', 'timeline.home');
+ // $callback->setPayloadSerializable($stream);
+ // $callback->addUsers($home);
+ // $pushHelper->toCallback($callback);
+ //
+ // $direct = array_map(
+ // function(Person $item): string {
+ // return $item->getUserId();
+ // }, $details->getDirectViewers()
+ // );
+ //
+ // $callback = new PushCallback('social', 'timeline.direct');
+ // $callback->addUsers($direct);
+ // $callback->setPayloadSerializable($stream);
+ // $pushHelper->toCallback($callback);
}
//