Check Disposition-Notification-To for inbound messages only

pull/194/merge
M66B 3 years ago
parent b689e2f6cc
commit 53925855fd

@ -406,6 +406,7 @@ public class MessageHelper {
if (receipt_type == 1 || receipt_type == 2) // Delivery receipt if (receipt_type == 1 || receipt_type == 2) // Delivery receipt
imessage.addHeader("Return-Receipt-To", to); imessage.addHeader("Return-Receipt-To", to);
// https://tools.ietf.org/html/rfc3798 // https://tools.ietf.org/html/rfc3798
if (receipt_type == 0 || receipt_type == 2) // Read receipt if (receipt_type == 0 || receipt_type == 2) // Read receipt
imessage.addHeader("Disposition-Notification-To", to); imessage.addHeader("Disposition-Notification-To", to);
@ -1446,8 +1447,9 @@ public class MessageHelper {
boolean getReceiptRequested() throws MessagingException { boolean getReceiptRequested() throws MessagingException {
ensureHeaders(); ensureHeaders();
return (imessage.getHeader("Return-Receipt-To") != null || // Return-Receipt-To = delivery receipt
imessage.getHeader("Disposition-Notification-To") != null); // Disposition-Notification-To = read receipt
return (imessage.getHeader("Disposition-Notification-To") != null);
} }
Address[] getReceiptTo() throws MessagingException { Address[] getReceiptTo() throws MessagingException {

Loading…
Cancel
Save