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:
authorAnna Larch <anna@nextcloud.com>2021-07-07 12:45:00 +0300
committerAnna Larch <anna@nextcloud.com>2021-07-12 16:03:34 +0300
commit6d44305d0f1133f15d2b7fabad1a5919d4b43546 (patch)
tree820954e99f3377e1ec785b8877a7e5214e4a1cff /lib/Listener
parent4ecb5a1f060a5a8f25722d0676f8b67b005cbbd6 (diff)
Move userId to controller
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'lib/Listener')
-rw-r--r--lib/Listener/AddressCollectionListener.php2
-rw-r--r--lib/Listener/NewMessageClassificationListener.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Listener/AddressCollectionListener.php b/lib/Listener/AddressCollectionListener.php
index 9486c8ded..2b430aacd 100644
--- a/lib/Listener/AddressCollectionListener.php
+++ b/lib/Listener/AddressCollectionListener.php
@@ -56,7 +56,7 @@ class AddressCollectionListener implements IEventListener {
if (!($event instanceof MessageSentEvent)) {
return;
}
- if ($this->preferences->getPreference('collect-data', 'true') !== 'true') {
+ if ($this->preferences->getPreference($event->getAccount()->getUserId(), 'collect-data', 'true') !== 'true') {
$this->logger->debug('Not collecting email addresses because the user opted out');
return;
}
diff --git a/lib/Listener/NewMessageClassificationListener.php b/lib/Listener/NewMessageClassificationListener.php
index d370d9b9d..501fb3a6e 100644
--- a/lib/Listener/NewMessageClassificationListener.php
+++ b/lib/Listener/NewMessageClassificationListener.php
@@ -79,8 +79,8 @@ class NewMessageClassificationListener implements IEventListener {
return;
}
- $allowTagging = $this->preferences->getPreference('tag-classified-messages');
- if ($allowTagging === "false") {
+ $allowTagging = $this->preferences->getPreference($event->getAccount()->getUserId(), 'tag-classified-messages');
+ if ($allowTagging === 'false') {
return;
}