From 83a664ca688e5023c6e824d00c4b992e6ee63238 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 18 Dec 2021 12:47:11 +0000 Subject: [PATCH] Fix mypy error --- python/src/deltachat/account.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/src/deltachat/account.py b/python/src/deltachat/account.py index db75d30d1..31804e4ce 100644 --- a/python/src/deltachat/account.py +++ b/python/src/deltachat/account.py @@ -403,7 +403,10 @@ class Account(object): """ arr = array("i") for msg in messages: - arr.append(getattr(msg, "id", msg)) + if isinstance(msg, Message): + arr.append(getattr(msg, "id")) + else: + arr.append(msg) msg_ids = ffi.cast("uint32_t*", ffi.from_buffer(arr)) lib.dc_markseen_msgs(self._dc_context, msg_ids, len(messages))