mirror of
https://github.com/nextcloud/spreed.git
synced 2025-08-16 15:27:59 +00:00
Move dismiss stored notification to specific endpoint
Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
@ -29,6 +29,7 @@ use InvalidArgumentException;
|
||||
use OC\User\NoUserException;
|
||||
use OCA\Talk\Config;
|
||||
use OCA\Talk\Exceptions\ParticipantNotFoundException;
|
||||
use OCA\Talk\Manager;
|
||||
use OCA\Talk\Participant;
|
||||
use OCA\Talk\Room;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
@ -52,6 +53,7 @@ class RecordingService {
|
||||
private ParticipantService $participantService,
|
||||
private IRootFolder $rootFolder,
|
||||
private IManager $notificationManager,
|
||||
private Manager $roomManager,
|
||||
private ITimeFactory $timeFactory,
|
||||
private Config $config,
|
||||
private RoomService $roomService
|
||||
@ -172,4 +174,15 @@ class RecordingService {
|
||||
]);
|
||||
$this->notificationManager->notify($notification);
|
||||
}
|
||||
|
||||
public function notificationDismiss(string $roomToken, string $userId, string $dateTime): void {
|
||||
$room = $this->roomManager->getRoomByToken($roomToken);
|
||||
$notification = $this->notificationManager->createNotification();
|
||||
$notification->setApp('spreed')
|
||||
->setObject('chat', (string) $room->getToken())
|
||||
->setSubject('record_file_stored')
|
||||
->setDateTime($this->timeFactory->getDateTime('@' . $dateTime))
|
||||
->setUser($userId);
|
||||
$this->notificationManager->markProcessed($notification);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user