Skip similar messages in same folder

pull/194/merge
M66B 3 years ago
parent 730c9aed8e
commit b251de1a6d

@ -422,8 +422,10 @@ public interface DaoMessage {
List<EntityMessage> getMessagesByInReplyTo(long account, String inreplyto); List<EntityMessage> getMessagesByInReplyTo(long account, String inreplyto);
@Query("SELECT * FROM message" + @Query("SELECT * FROM message" +
" WHERE account = :account" + " LEFT JOIN message AS base ON base.id = :id" +
" AND (id = :id OR msgid = :msgid)") " WHERE message.account = :account" +
" AND (message.id = :id" +
" OR (message.msgid = :msgid AND message.folder <> base.folder))")
List<EntityMessage> getMessagesBySimilarity(long account, long id, String msgid); List<EntityMessage> getMessagesBySimilarity(long account, long id, String msgid);
@Query("SELECT COUNT(*) FROM message" + @Query("SELECT COUNT(*) FROM message" +

Loading…
Cancel
Save