diff --git a/src/message_api.cc b/src/message_api.cc index dc336f7..9c6fa34 100644 --- a/src/message_api.cc +++ b/src/message_api.cc @@ -51,9 +51,10 @@ namespace pEp { int rating = (int) _rating; int flags = (int) _flags; - string sync_status = status == PEP_MESSAGE_CONSUMED ? "MESSAGE_CONSUMED" : - status == PEP_MESSAGE_DISCARDED ? "MESSAGE_DISCARDED" : - ""; + string sync_status = flags & PEP_decrypt_flag_discarded ? + "MESSAGE_DISCARDED" : + flags & PEP_decrypt_flag_consumed ? + "MESSAGE_CONSUMED" : ""; Message dst = _dst ? Message(_dst) : Message(src); return boost::python::make_tuple(dst, keylist, rating, sync_status, flags); diff --git a/src/pEpmodule.cc b/src/pEpmodule.cc index 7dfa0e9..85beb09 100644 --- a/src/pEpmodule.cc +++ b/src/pEpmodule.cc @@ -32,10 +32,6 @@ namespace pEp { return; if (status >= 0x400 && status <= 0x4ff) return; - if (status == PEP_MESSAGE_CONSUMED) - return; - if (status == PEP_MESSAGE_DISCARDED) - return; if (status == PEP_OUT_OF_MEMORY) throw bad_alloc(); if (status == PEP_ILLEGAL_VALUE)