File tree 1 file changed +2
-4
lines changed
lib/Service/Classification
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 12
12
use Horde_Imap_Client ;
13
13
use OCA \Mail \Account ;
14
14
use OCA \Mail \Contracts \IMailManager ;
15
- use OCA \Mail \Contracts \IUserPreferences ;
16
15
use OCA \Mail \Db \Mailbox ;
17
16
use OCA \Mail \Db \Message ;
18
17
use OCA \Mail \Db \Tag ;
@@ -35,7 +34,7 @@ public function __construct(
35
34
private TagMapper $ tagMapper ,
36
35
private LoggerInterface $ logger ,
37
36
private IMailManager $ mailManager ,
38
- private IUserPreferences $ preferences ,
37
+ private ClassificationSettingsService $ classificationSettingsService ,
39
38
) {
40
39
}
41
40
@@ -59,8 +58,7 @@ public function classifyNewMessages(
59
58
Account $ account ,
60
59
Tag $ importantTag ,
61
60
): void {
62
- $ allowTagging = $ this ->preferences ->getPreference ($ account ->getUserId (), 'tag-classified-messages ' );
63
- if ($ allowTagging === 'false ' ) {
61
+ if (!$ this ->classificationSettingsService ->isClassificationEnabled ($ account ->getUserId ())) {
64
62
return ;
65
63
}
66
64
You can’t perform that action at this time.
0 commit comments