1
0
Fork 0
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:
M66B 2019-10-13 20:13:00 +02:00
parent 61b6fffd6d
commit 7bb4bbb7cc
2 changed files with 7 additions and 0 deletions

View file

@ -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);

View file

@ -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);