summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2018-12-17 09:54:28 -0100
committerMaxence Lange <maxence@artificial-owl.com>2018-12-17 09:54:28 -0100
commit47c658c32b712277f9330801085c4dd288dbe742 (patch)
tree54e6e2355eec9be453cb6894f3c5c5d3073c89a3 /lib
parent923bb732bde6c283f6e1497913f50970b5e9dc0e (diff)
bring back the request on new follow
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/FollowService.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Service/FollowService.php b/lib/Service/FollowService.php
index 852c3374..e67a703b 100644
--- a/lib/Service/FollowService.php
+++ b/lib/Service/FollowService.php
@@ -36,6 +36,7 @@ use OCA\Social\Db\FollowsRequest;
use OCA\Social\Exceptions\CacheActorDoesNotExistException;
use OCA\Social\Exceptions\FollowDoesNotExistException;
use OCA\Social\Exceptions\FollowSameAccountException;
+use OCA\Social\Exceptions\InvalidOriginException;
use OCA\Social\Exceptions\InvalidResourceException;
use OCA\Social\Exceptions\RedundancyLimitException;
use OCA\Social\Exceptions\Request410Exception;
@@ -71,6 +72,9 @@ class FollowService {
/** @var FollowsRequest */
private $followsRequest;
+ /** @var ActivityService */
+ private $activityService;
+
/** @var CacheActorService */
private $cacheActorService;
@@ -89,15 +93,18 @@ class FollowService {
* FollowService constructor.
*
* @param FollowsRequest $followsRequest
+ * @param ActivityService $activityService
* @param CacheActorService $cacheActorService
* @param ConfigService $configService
* @param MiscService $miscService
*/
public function __construct(
- FollowsRequest $followsRequest, CacheActorService $cacheActorService,
+ FollowsRequest $followsRequest, ActivityService $activityService,
+ CacheActorService $cacheActorService,
ConfigService $configService, MiscService $miscService
) {
$this->followsRequest = $followsRequest;
+ $this->activityService = $activityService;
$this->cacheActorService = $cacheActorService;
$this->configService = $configService;
$this->miscService = $miscService;
@@ -133,6 +140,8 @@ class FollowService {
* @throws SocialAppConfigException
* @throws UrlCloudException
* @throws UnknownItemException
+ * @throws InvalidOriginException
+ * @throws \Exception
*/
public function followAccount(Person $actor, string $account) {
$remoteActor = $this->cacheActorService->getFromAccount($account);
@@ -159,7 +168,7 @@ class FollowService {
$remoteActor->getInbox(), InstancePath::TYPE_INBOX, InstancePath::PRIORITY_TOP
)
);
-// $this->activityService->request($follow);
+ $this->activityService->request($follow);
}
}