return list of messages in this chat. :returns: list of :class:`deltachat.message.Message` objects for this chat.
(self)
| 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. |