Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-03-31 20:13:08 +0300
committerJoas Schilling <coding@schilljs.com>2022-03-31 20:18:58 +0300
commit7fe2cf5c54b2f9b4584d639ab66d89d36b28bc76 (patch)
tree87722a2c37e27dcc556433754460cc3c19cedae9 /lib/Service
parente9c6de6a94635bd249fdaa407120e6db4b9da865 (diff)
Handle deleting
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/AttachmentService.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Service/AttachmentService.php b/lib/Service/AttachmentService.php
index f26a22967..cfe3c0525 100644
--- a/lib/Service/AttachmentService.php
+++ b/lib/Service/AttachmentService.php
@@ -59,4 +59,12 @@ class AttachmentService {
public function getAttachmentsByType(Room $room, string $objectType, int $offset, int $limit): array {
return $this->attachmentMapper->getAttachmentsByType($room->getId(), $objectType, $offset, $limit);
}
+
+ public function deleteAttachmentByMessageId(int $messageId): void {
+ $this->attachmentMapper->deleteByMessageId($messageId);
+ }
+
+ public function deleteAttachmentsForRoom(Room $room): void {
+ $this->attachmentMapper->deleteByRoomId($room->getId());
+ }
}