mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 07:32:12 +03:00
add chat.get_summary
(returns a lot like the original function chatlit.getsummary but it doesn't need a chatlist to work)
This commit is contained in:
@@ -5,7 +5,7 @@ import calendar
|
||||
import json
|
||||
from datetime import datetime
|
||||
import os
|
||||
from .cutil import as_dc_charpointer, from_dc_charpointer, iter_array
|
||||
from .cutil import as_dc_charpointer, from_dc_charpointer, iter_array, DCLot
|
||||
from .capi import lib, ffi
|
||||
from . import const
|
||||
from .message import Message
|
||||
@@ -344,6 +344,11 @@ class Chat(object):
|
||||
s = from_dc_charpointer(dc_res)
|
||||
return json.loads(s)
|
||||
|
||||
def get_summary_lot(self):
|
||||
""" return summary lot of chat (used for displaying last message in a chatlist)"""
|
||||
lot = lib.dc_chat_get_summary(self.account._dc_context, self._dc_chat)
|
||||
return DCLot(lot)
|
||||
|
||||
# ------ group management API ------------------------------
|
||||
|
||||
def add_contact(self, obj):
|
||||
|
||||
Reference in New Issue
Block a user