Improved logging

This commit is contained in:
M66B 2022-11-16 10:59:57 +01:00
parent e12aaf597f
commit af8a3af8f7
1 changed files with 4 additions and 3 deletions

View File

@ -232,13 +232,14 @@ public class EntityOperation {
Objects.equals(source.account, target.account) &&
(jargs.opt(3) == null || !jargs.optBoolean(3))) {
jargs.remove(3);
EntityLog.log(context, "Auto block sender=" + MessageHelper.formatAddresses(message.from));
// Prevent blocking self
List<TupleIdentityEx> identities = db.identity().getComposableIdentities(null);
if (!message.fromSelf(identities))
if (!message.fromSelf(identities)) {
EntityLog.log(context, "Auto block sender=" + MessageHelper.formatAddresses(message.from));
EntityContact.update(context,
message.account, message.identity, message.from,
EntityContact.TYPE_JUNK, message.received);
}
}
if (EntityFolder.DRAFTS.equals(source.type) &&