mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
api(deltechat-rpc-client): add Account.wait_for_msgs_noticed_event()
This commit is contained in:
@@ -339,6 +339,13 @@ class Account:
|
|||||||
if event.kind == EventType.MSGS_CHANGED:
|
if event.kind == EventType.MSGS_CHANGED:
|
||||||
return event
|
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):
|
def wait_for_incoming_msg(self):
|
||||||
"""Wait for incoming message and return it.
|
"""Wait for incoming message and return it.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user