mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 18:06:35 +03:00
api(deltachat-rpc-client): add Message.get_read_receipts()
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import json
|
||||
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 .const import EventType
|
||||
@@ -39,6 +39,11 @@ class Message:
|
||||
snapshot["message"] = self
|
||||
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]:
|
||||
"""Get message reactions."""
|
||||
reactions = self._rpc.get_message_reactions(self.account.id, self.id)
|
||||
|
||||
Reference in New Issue
Block a user