package from Python's standard library. You could e.g. create
this as such::
- notmuch_msg = db.get_message(msgid) # or from a query
+ notmuch_msg = db.find(msgid) # or from a query
parser = email.parser.BytesParser(policy=email.policy.default)
with notmuch_msg.path.open('rb) as fp:
email_msg = parser.parse(fp)
self._msg_p, capi.lib.NOTMUCH_MESSAGE_FLAG_EXCLUDED)
return bool(ret)
+ @property
+ def matched(self):
+ """Indicates whether this message was matched by the query.
+
+ When a thread is created from a search, some of the
+ messages may not match the original query. This property
+ is set to *True* for those that do match.
+
+ :raises ObjectDestroyedError: if used after destroyed.
+ """
+ ret = capi.lib.notmuch_message_get_flag(
+ self._msg_p, capi.lib.NOTMUCH_MESSAGE_FLAG_MATCH)
+ return bool(ret)
+
@property
def date(self):
"""The message date as an integer.