diff options
author | Joas Schilling <coding@schilljs.com> | 2022-03-31 20:13:08 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-03-31 20:18:58 +0300 |
commit | 7fe2cf5c54b2f9b4584d639ab66d89d36b28bc76 (patch) | |
tree | 87722a2c37e27dcc556433754460cc3c19cedae9 /lib/Service | |
parent | e9c6de6a94635bd249fdaa407120e6db4b9da865 (diff) |
Handle deleting
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Service')
-rw-r--r-- | lib/Service/AttachmentService.php | 8 |
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()); + } } |