X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython-cffi%2Fnotmuch2%2F_thread.py;fp=bindings%2Fpython-cffi%2Fnotmuch2%2F_thread.py;h=e883f3082b8b9bc5fb086c180e3e910e4e72ccf6;hp=bb76f2dc284a596eaa5992443a3bd3fb7b468ce9;hb=2d895a0119b423b117d10e890c9e0eb5d2a9cdf8;hpb=131757907907380213b32934d9e73cec942ace43 diff --git a/bindings/python-cffi/notmuch2/_thread.py b/bindings/python-cffi/notmuch2/_thread.py index bb76f2dc..e883f308 100644 --- a/bindings/python-cffi/notmuch2/_thread.py +++ b/bindings/python-cffi/notmuch2/_thread.py @@ -62,7 +62,9 @@ class Thread(base.NotmuchObject, collections.abc.Iterable): :raises ObjectDestroyedError: if used after destroyed. """ msgs_p = capi.lib.notmuch_thread_get_toplevel_messages(self._thread_p) - return message.MessageIter(self, msgs_p, db=self._db) + return message.MessageIter(self, msgs_p, + db=self._db, + msg_cls=message.OwnedMessage) def __iter__(self): """Return an iterator over all the messages in the thread. @@ -72,7 +74,9 @@ class Thread(base.NotmuchObject, collections.abc.Iterable): :raises ObjectDestroyedError: if used after destroyed. """ msgs_p = capi.lib.notmuch_thread_get_messages(self._thread_p) - return message.MessageIter(self, msgs_p, db=self._db) + return message.MessageIter(self, msgs_p, + db=self._db, + msg_cls=message.OwnedMessage) @property def matched(self):