From 94f57e786d01d69a1b9d93592bbd02a2ef6a59fb Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 9 Mar 2025 22:52:06 +0000 Subject: [PATCH] api(deltechat-rpc-client): add Account.wait_for_msgs_noticed_event() --- deltachat-rpc-client/src/deltachat_rpc_client/account.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/account.py b/deltachat-rpc-client/src/deltachat_rpc_client/account.py index d9158cff4..74753a666 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/account.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/account.py @@ -339,6 +339,13 @@ class Account: if event.kind == EventType.MSGS_CHANGED: return event + def wait_for_msgs_noticed_event(self): + """Wait for messages noticed event and return it.""" + while True: + event = self.wait_for_event() + if event.kind == EventType.MSGS_NOTICED: + return event + def wait_for_incoming_msg(self): """Wait for incoming message and return it.