mirror of
https://github.com/chatmail/core.git
synced 2026-05-14 04:16:30 +03:00
api(deltachat-rpc-client): add Message.get_read_receipts()
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import TYPE_CHECKING, Optional, Union
|
from typing import TYPE_CHECKING, List, Optional, Union
|
||||||
|
|
||||||
from ._utils import AttrDict, futuremethod
|
from ._utils import AttrDict, futuremethod
|
||||||
from .const import EventType
|
from .const import EventType
|
||||||
@@ -39,6 +39,11 @@ class Message:
|
|||||||
snapshot["message"] = self
|
snapshot["message"] = self
|
||||||
return snapshot
|
return snapshot
|
||||||
|
|
||||||
|
def get_read_receipts(self) -> List[AttrDict]:
|
||||||
|
"""Get message read receipts."""
|
||||||
|
read_receipts = self._rpc.get_message_read_receipts(self.account.id, self.id)
|
||||||
|
return [AttrDict(read_receipt) for read_receipt in read_receipts]
|
||||||
|
|
||||||
def get_reactions(self) -> Optional[AttrDict]:
|
def get_reactions(self) -> Optional[AttrDict]:
|
||||||
"""Get message reactions."""
|
"""Get message reactions."""
|
||||||
reactions = self._rpc.get_message_reactions(self.account.id, self.id)
|
reactions = self._rpc.get_message_reactions(self.account.id, self.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user