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

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2021-04-06 17:55:22 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-04-19 14:10:27 +0300
commit28ea91bf6b15e098c158bd68ff4435334db00849 (patch)
tree5dea2595a40d5ee9bb56ad96978640be3c57d1eb /lib/Service
parente39a7f9654879f6b2be2d2983ef48aab5832fca8 (diff)
Allow signatures for aliases
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/AliasesService.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Service/AliasesService.php b/lib/Service/AliasesService.php
index 869d59708..db21e1388 100644
--- a/lib/Service/AliasesService.php
+++ b/lib/Service/AliasesService.php
@@ -54,6 +54,7 @@ class AliasesService {
* @param int $aliasId
* @param string $currentUserId
* @return Alias
+ * @throws DoesNotExistException
*/
public function find(int $aliasId, string $currentUserId): Alias {
return $this->aliasMapper->find($aliasId, $currentUserId);
@@ -83,6 +84,7 @@ class AliasesService {
* @param int $aliasId
* @param String $currentUserId
* @return Alias
+ * @throws DoesNotExistException
*/
public function delete(int $aliasId, string $currentUserId): Alias {
$alias = $this->aliasMapper->find($aliasId, $currentUserId);
@@ -101,4 +103,18 @@ class AliasesService {
public function deleteAll($accountId): void {
$this->aliasMapper->deleteAll($accountId);
}
+
+ /**
+ * Update signature for alias
+ *
+ * @param string $userId
+ * @param int $aliasId
+ * @param string|null $signature
+ * @throws DoesNotExistException
+ */
+ public function updateSignature(string $userId, int $aliasId, string $signature = null): void {
+ $alias = $this->find($aliasId, $userId);
+ $alias->setSignature($signature);
+ $this->aliasMapper->update($alias);
+ }
}