summaryrefslogtreecommitdiffstats
path: root/lib/Service
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-05-06 13:32:31 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-05-06 13:32:31 -0100
commit8174167e482481b4d687281103b92bf172d7f856 (patch)
tree7bd28ecfe4d10707b1eeca9d3965f0216452dfb1 /lib/Service
parent76997d0cd5c351e1e7afe2f067c08e536a862447 (diff)
cleaning and renaming
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/CheckService.php6
-rw-r--r--lib/Service/NoteService.php12
2 files changed, 10 insertions, 8 deletions
diff --git a/lib/Service/CheckService.php b/lib/Service/CheckService.php
index ff3960b5..47a4a133 100644
--- a/lib/Service/CheckService.php
+++ b/lib/Service/CheckService.php
@@ -26,6 +26,8 @@ namespace OCA\Social\Service;
use daita\MySmallPhpTools\Traits\TArrayTools;
use daita\MySmallPhpTools\Traits\TStringTools;
+use Exception;
+use GuzzleHttp\Exception\ClientException;
use OCA\Social\Db\FollowsRequest;
use OCA\Social\Model\ActivityPub\Object\Follow;
use OCP\AppFramework\Http;
@@ -175,8 +177,8 @@ class CheckService {
return true;
}
- } catch (\GuzzleHttp\Exception\ClientException $e) {
- } catch (\Exception $e) {
+ } catch (ClientException $e) {
+ } catch (Exception $e) {
}
return false;
diff --git a/lib/Service/NoteService.php b/lib/Service/NoteService.php
index 934d53f9..3ebdf223 100644
--- a/lib/Service/NoteService.php
+++ b/lib/Service/NoteService.php
@@ -312,18 +312,18 @@ class NoteService {
/**
- * @param Note $note
+ * @param Stream $item
*
* @throws Exception
*/
- public function deleteLocalNote(Note $note) {
- if (!$note->isLocal()) {
+ public function deleteLocalItem(Stream $item) {
+ if (!$item->isLocal()) {
return;
}
- $note->setActorId($note->getAttributedTo());
- $this->activityService->deleteActivity($note);
- $this->notesRequest->deleteNoteById($note->getId());
+ $item->setActorId($item->getAttributedTo());
+ $this->activityService->deleteActivity($item);
+ $this->notesRequest->deleteNoteById($item->getId());
}