MCPcopy Create free account
hub / github.com/chatmail/core / get_messages

Method get_messages

python/src/deltachat/chat.py:350–359  ·  view source on GitHub ↗

return list of messages in this chat. :returns: list of :class:`deltachat.message.Message` objects for this chat.

(self)

Source from the content-addressed store, hash-verified

348 return Message(self.account, dc_msg)
349
350 def get_messages(self):
351 """return list of messages in this chat.
352
353 :returns: list of :class:`deltachat.message.Message` objects for this chat.
354 """
355 dc_array = ffi.gc(
356 lib.dc_get_chat_msgs(self.account._dc_context, self.id, 0, 0),
357 lib.dc_array_unref,
358 )
359 return list(iter_array(dc_array, lambda x: Message.from_db(self.account, x)))
360
361 def count_fresh_messages(self):
362 """return number of fresh messages in this chat.

Calls 2

iter_arrayFunction · 0.85
from_dbMethod · 0.80