Commit 8afb36a0 authored by Hussein's avatar Hussein

P4A-776 Check X-PEP-DISABLED flag before sending the message when saving it.

parent a80b8884
......@@ -126,6 +126,7 @@ import foundation.pEp.jniadapter.pEpException;
import timber.log.Timber;
import static com.fsck.k9.K9.MAX_SEND_ATTEMPTS;
import static com.fsck.k9.mail.Flag.X_PEP_DISABLED;
import static com.fsck.k9.mail.Flag.X_REMOTE_COPY_STARTED;
......@@ -2922,7 +2923,11 @@ public class MessagingController implements Sync.MessageToSendCallback, KeyImpor;
Message localMessage = localFolder.getMessage(message.getUid());
if (PEpUtils.ispEpDisabled(account, pEpProvider.getRating(message))) {
// Only add rating to the local copy, not on headers
// to avoid sending the rating to the server
if (PEpUtils.ispEpDisabled(account, pEpProvider.getRating(message))
|| message.isSet(X_PEP_DISABLED)) {
((LocalMessage) localMessage).setpEpRating(Rating.pEpRatingUnencrypted);
//message.setHeader(MimeHeader.HEADER_PEP_RATING, PEpUtils.ratingToString(Rating.pEpRatingUnencrypted));
} else {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment