mirror of
https://github.com/chatmail/core.git
synced 2026-05-25 01:36:31 +03:00
add Message.mark_seen shortcut
This commit is contained in:
@@ -276,6 +276,10 @@ class Message(object):
|
|||||||
""" return True if it's a file message. """
|
""" return True if it's a file message. """
|
||||||
return self._view_type == const.DC_MSG_FILE
|
return self._view_type == const.DC_MSG_FILE
|
||||||
|
|
||||||
|
def mark_seen(self):
|
||||||
|
""" mark this message as seen. """
|
||||||
|
self.account.mark_seen_messages([self.id])
|
||||||
|
|
||||||
|
|
||||||
# some code for handling DC_MSG_* view types
|
# some code for handling DC_MSG_* view types
|
||||||
|
|
||||||
|
|||||||
@@ -805,7 +805,7 @@ class TestOnlineAccount:
|
|||||||
|
|
||||||
lp.sec("check that a second call to mark_seen does not create change or smtp job")
|
lp.sec("check that a second call to mark_seen does not create change or smtp job")
|
||||||
ac2._evtracker.consume_events()
|
ac2._evtracker.consume_events()
|
||||||
ac2.mark_seen_messages([msg_in])
|
msg_in.mark_seen()
|
||||||
try:
|
try:
|
||||||
ac2._evtracker.get_matching("DC_EVENT_MSG_READ", timeout=0.01)
|
ac2._evtracker.get_matching("DC_EVENT_MSG_READ", timeout=0.01)
|
||||||
except queue.Empty:
|
except queue.Empty:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ envlist =
|
|||||||
[testenv]
|
[testenv]
|
||||||
commands =
|
commands =
|
||||||
pytest -n6 --reruns 2 --reruns-delay 5 -v -rsXx --ignored {posargs: tests examples}
|
pytest -n6 --reruns 2 --reruns-delay 5 -v -rsXx --ignored {posargs: tests examples}
|
||||||
# python tests/package_wheels.py {toxworkdir}/wheelhouse
|
python tests/package_wheels.py {toxworkdir}/wheelhouse
|
||||||
passenv =
|
passenv =
|
||||||
TRAVIS
|
TRAVIS
|
||||||
DCC_RS_DEV
|
DCC_RS_DEV
|
||||||
|
|||||||
Reference in New Issue
Block a user