Added inline answer button configuration

This commit is contained in:
M66B
2023-03-16 08:22:39 +01:00
parent 2bd86fb978
commit 3a576bdef9
14 changed files with 3240 additions and 2 deletions

View File

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