Fixed sender extra

pull/161/head
M66B 5 years ago
parent f34681b916
commit 4a3d266318

@ -2050,11 +2050,13 @@ public class FragmentCompose extends FragmentBase {
"list".equals(action) || "list".equals(action) ||
"receipt".equals(action) || "receipt".equals(action) ||
"participation".equals(action)) { "participation".equals(action)) {
if (ref.to != null && ref.to.length > 0) { EntityFolder rfolder = db.folder().getFolder(ref.folder);
String to = ((InternetAddress) ref.to[0]).getAddress(); Address[] sender = (rfolder != null && EntityFolder.isOutgoing(rfolder.type) ? ref.from : ref.to);
int at = to.indexOf('@'); if (sender != null && sender.length > 0) {
String s = ((InternetAddress) sender[0]).getAddress();
int at = s.indexOf('@');
if (at > 0) if (at > 0)
draft.extra = to.substring(0, at); draft.extra = s.substring(0, at);
} }
draft.references = (ref.references == null ? "" : ref.references + " ") + ref.msgid; draft.references = (ref.references == null ? "" : ref.references + " ") + ref.msgid;

Loading…
Cancel
Save