File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
lib/Service/Classification Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1212use Horde_Imap_Client ;
1313use OCA \Mail \Account ;
1414use OCA \Mail \Contracts \IMailManager ;
15- use OCA \Mail \Contracts \IUserPreferences ;
1615use OCA \Mail \Db \Mailbox ;
1716use OCA \Mail \Db \Message ;
1817use OCA \Mail \Db \Tag ;
@@ -35,7 +34,7 @@ public function __construct(
3534 private TagMapper $ tagMapper ,
3635 private LoggerInterface $ logger ,
3736 private IMailManager $ mailManager ,
38- private IUserPreferences $ preferences ,
37+ private ClassificationSettingsService $ classificationSettingsService ,
3938 ) {
4039 }
4140
@@ -59,8 +58,7 @@ public function classifyNewMessages(
5958 Account $ account ,
6059 Tag $ importantTag ,
6160 ): void {
62- $ allowTagging = $ this ->preferences ->getPreference ($ account ->getUserId (), 'tag-classified-messages ' );
63- if ($ allowTagging === 'false ' ) {
61+ if (!$ this ->classificationSettingsService ->isClassificationEnabled ($ account ->getUserId ())) {
6462 return ;
6563 }
6664
You can’t perform that action at this time.
0 commit comments