mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 11:25:13 +01:00
Added inline answer button configuration
This commit is contained in:
@@ -47,6 +47,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.mail.internet.InternetAddress;
|
||||
|
||||
@Entity(
|
||||
tableName = EntityOperation.TABLE_NAME,
|
||||
foreignKeys = {
|
||||
@@ -230,6 +232,16 @@ public class EntityOperation {
|
||||
if (source == null || target == null || source.id.equals(target.id))
|
||||
return;
|
||||
|
||||
if (message.from != null && message.from.length == 1 &&
|
||||
EntityFolder.USER.equals(target.type)) {
|
||||
String email = ((InternetAddress) message.from[0]).getAddress();
|
||||
if (!TextUtils.isEmpty(email)) {
|
||||
EntityContact contact = db.contact().getContact(target.account, EntityContact.TYPE_FROM, email);
|
||||
if (contact != null)
|
||||
db.contact().setContactFolder(contact.id, target.id);
|
||||
}
|
||||
}
|
||||
|
||||
if (EntityFolder.JUNK.equals(target.type) &&
|
||||
Objects.equals(source.account, target.account)) {
|
||||
Boolean noblock = (Boolean) jargs.opt(3);
|
||||
|
||||
Reference in New Issue
Block a user