mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-04 02:28:18 +00:00
Report spam similar
This commit is contained in:
parent
4a04357d73
commit
ff305ddd93
2 changed files with 15 additions and 1 deletions
|
@ -468,6 +468,11 @@ public interface DaoMessage {
|
||||||
" AND (:to IS NULL OR received IS NULL OR received < :to)")
|
" AND (:to IS NULL OR received IS NULL OR received < :to)")
|
||||||
List<TupleThreadInfo> getThreadInfo(long account, List<String> msgids, Long from, Long to);
|
List<TupleThreadInfo> getThreadInfo(long account, List<String> msgids, Long from, Long to);
|
||||||
|
|
||||||
|
@Query("SELECT * FROM message" +
|
||||||
|
" WHERE folder = :folder" +
|
||||||
|
" AND sender = :sender")
|
||||||
|
List<EntityMessage> getMessagesBySender(long folder, String sender);
|
||||||
|
|
||||||
@Query("SELECT * FROM message" +
|
@Query("SELECT * FROM message" +
|
||||||
" WHERE account = :account" +
|
" WHERE account = :account" +
|
||||||
" AND sender = :sender" +
|
" AND sender = :sender" +
|
||||||
|
|
|
@ -10956,9 +10956,18 @@ public class FragmentMessages extends FragmentBase
|
||||||
if (junk == null)
|
if (junk == null)
|
||||||
throw new IllegalArgumentException(context.getString(R.string.title_no_junk_folder));
|
throw new IllegalArgumentException(context.getString(R.string.title_no_junk_folder));
|
||||||
|
|
||||||
if (!message.folder.equals(junk.id))
|
if (!message.folder.equals(junk.id)) {
|
||||||
EntityOperation.queue(context, message, EntityOperation.MOVE, junk.id, null, null, true);
|
EntityOperation.queue(context, message, EntityOperation.MOVE, junk.id, null, null, true);
|
||||||
|
|
||||||
|
if (!Helper.isPlayStoreInstall()) {
|
||||||
|
List<EntityMessage> similar = db.message().getMessagesBySender(message.folder, message.sender);
|
||||||
|
if (similar != null)
|
||||||
|
for (EntityMessage m : similar)
|
||||||
|
if (!message.id.equals(m.id))
|
||||||
|
EntityOperation.queue(context, m, EntityOperation.MOVE, junk.id, null, null, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (block_domain) {
|
if (block_domain) {
|
||||||
List<EntityRule> rules = EntityRule.blockSender(context, message, junk, block_domain);
|
List<EntityRule> rules = EntityRule.blockSender(context, message, junk, block_domain);
|
||||||
for (EntityRule rule : rules) {
|
for (EntityRule rule : rules) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue