mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-30 19:56:10 +00:00
Match identity on add
This commit is contained in:
parent
61b6fffd6d
commit
7bb4bbb7cc
2 changed files with 7 additions and 0 deletions
|
@ -741,6 +741,10 @@ class Core {
|
|||
Log.i(folder.name + " appended uid=" + message.uid);
|
||||
db.message().setMessageUid(message.id, message.uid);
|
||||
|
||||
EntityIdentity identity = matchIdentity(context, folder, message);
|
||||
message.identity = (identity == null ? null : identity.id);
|
||||
db.message().setMessageIdentity(message.id, message.identity);
|
||||
|
||||
List<EntityRule> rules = db.rule().getEnabledRules(folder.id);
|
||||
runRules(context, imessage, message, rules);
|
||||
updateContactInfo(context, folder, message);
|
||||
|
|
|
@ -380,6 +380,9 @@ public interface DaoMessage {
|
|||
@Update
|
||||
int updateMessage(EntityMessage message);
|
||||
|
||||
@Query("UPDATE message SET identity = :identity WHERE id = :id")
|
||||
int setMessageIdentity(long id, Long identity);
|
||||
|
||||
@Query("UPDATE message SET uid = :uid WHERE id = :id")
|
||||
int setMessageUid(long id, Long uid);
|
||||
|
||||
|
|
Loading…
Reference in a new issue