File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
deltachat-rpc-client/tests Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -726,6 +726,26 @@ def test_markseen_contact_request(acfactory):
726
726
assert message2 .get_snapshot ().state == MessageState .IN_SEEN
727
727
728
728
729
+ def test_read_receipt (acfactory ):
730
+ """
731
+ Test sending a read receipt and ensure it is attributed to the correct contact.
732
+ """
733
+ alice , bob = acfactory .get_online_accounts (2 )
734
+
735
+ alice_chat_bob = alice .create_chat (bob )
736
+ alice_contact_bob = alice .create_contact (bob )
737
+ bob .create_chat (alice ) # Accept the chat
738
+
739
+ alice_chat_bob .send_text ("Hello Bob!" )
740
+ msg = bob .wait_for_incoming_msg ()
741
+ msg .mark_seen ()
742
+
743
+ read_msg = alice .get_message_by_id (alice .wait_for_event (EventType .MSG_READ ).msg_id )
744
+ read_receipts = read_msg .get_read_receipts ()
745
+ assert len (read_receipts ) == 1
746
+ assert read_receipts [0 ].contact_id == alice_contact_bob .id
747
+
748
+
729
749
def test_get_http_response (acfactory ):
730
750
alice = acfactory .new_configured_account ()
731
751
http_response = alice ._rpc .get_http_response (alice .id , "https://example.org" )
You can’t perform that action at this time.
0 commit comments