mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 07:06:18 +02:00
Limit subject threading to 24 hours
This commit is contained in:
@@ -424,8 +424,9 @@ public interface DaoMessage {
|
||||
@Query("SELECT * FROM message" +
|
||||
" WHERE account = :account" +
|
||||
" AND sender = :sender" +
|
||||
" AND subject = :subject")
|
||||
List<EntityMessage> getMessagesBySubject(long account, String sender, String subject);
|
||||
" AND subject = :subject" +
|
||||
" AND received >= :since")
|
||||
List<EntityMessage> getMessagesBySubject(long account, String sender, String subject, long since);
|
||||
|
||||
@Query("SELECT message.* FROM message" +
|
||||
" LEFT JOIN message AS base ON base.id = :id" +
|
||||
@@ -647,8 +648,10 @@ public interface DaoMessage {
|
||||
int updateMessage(EntityMessage message);
|
||||
|
||||
@Query("UPDATE message SET thread = :thread" +
|
||||
" WHERE account = :account AND thread = :old AND NOT (:old IS :thread)")
|
||||
int updateMessageThread(long account, String old, String thread);
|
||||
" WHERE account = :account" +
|
||||
" AND thread = :old AND NOT (:old IS :thread)" +
|
||||
" AND (:since IS NULL OR received >= :since)")
|
||||
int updateMessageThread(long account, String old, String thread, Long since);
|
||||
|
||||
@Query("UPDATE message SET uid = :uid WHERE id = :id AND NOT (uid IS :uid)")
|
||||
int setMessageUid(long id, Long uid);
|
||||
|
||||
Reference in New Issue
Block a user