Allow larger user message size

This commit is contained in:
M66B 2020-07-03 10:23:34 +02:00
parent f4ef463cbd
commit bbfeec1a79
2 changed files with 6 additions and 12 deletions

View File

@ -900,15 +900,7 @@ public class FragmentIdentity extends FragmentBase {
identity.sign_key_alias = null;
identity.error = null;
identity.last_connected = last_connected;
if (user_max_size == null)
identity.max_size = server_max_size;
else {
if (server_max_size == null)
identity.max_size = user_max_size;
else
identity.max_size = Math.min(user_max_size, server_max_size);
}
identity.max_size = (user_max_size == null ? server_max_size : user_max_size);
if (identity.primary)
db.identity().resetPrimary(account);

View File

@ -556,9 +556,11 @@ public class ServiceSend extends ServiceBase {
throw new IOException("Test");
db.identity().setIdentityState(ident.id, "connected");
Long max_size = iservice.getMaxSize();
if (max_size != null)
db.identity().setIdentityMaxSize(ident.id, max_size);
if (ident.max_size == null) {
Long max_size = iservice.getMaxSize();
if (max_size != null)
db.identity().setIdentityMaxSize(ident.id, max_size);
}
Address[] to = imessage.getAllRecipients();
String via = "via " + ident.host + "/" + ident.user +