diff --git a/src/message.cc b/src/message.cc index 47210bd..2654672 100644 --- a/src/message.cc +++ b/src/message.cc @@ -297,7 +297,8 @@ namespace pEp { { if (!(_msg && _msg->from)) throw invalid_argument("from must be a valid Identity()"); - if (!(_msg && _msg->dir == PEP_dir_outgoing)) + if (!(_msg->dir == PEP_dir_outgoing && _msg->from->user_id && + strcmp(_msg->from->user_id, PEP_OWN_USERID) == 0)) throw invalid_argument("Message.dir must be outgoing"); PEP_rating rating = PEP_rating_undefined;