Skip to content

Commit ebddabe

Browse files
committed
api(deltachat-rpc-client): add Message.get_read_receipts()
1 parent b81f7cf commit ebddabe

File tree

1 file changed

+6
-1
lines changed
  • deltachat-rpc-client/src/deltachat_rpc_client

1 file changed

+6
-1
lines changed

deltachat-rpc-client/src/deltachat_rpc_client/message.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import json
44
from dataclasses import dataclass
5-
from typing import TYPE_CHECKING, Optional, Union
5+
from typing import TYPE_CHECKING, List, Optional, Union
66

77
from ._utils import AttrDict, futuremethod
88
from .const import EventType
@@ -39,6 +39,11 @@ def get_snapshot(self) -> AttrDict:
3939
snapshot["message"] = self
4040
return snapshot
4141

42+
def get_read_receipts(self) -> List[AttrDict]:
43+
"""Get message read receipts."""
44+
read_receipts = self._rpc.get_message_read_receipts(self.account.id, self.id)
45+
return [AttrDict(read_receipt) for read_receipt in read_receipts]
46+
4247
def get_reactions(self) -> Optional[AttrDict]:
4348
"""Get message reactions."""
4449
reactions = self._rpc.get_message_reactions(self.account.id, self.id)

0 commit comments

Comments
 (0)