diff --git a/fbchat/_mqtt.py b/fbchat/_mqtt.py index a03f615..43105af 100644 --- a/fbchat/_mqtt.py +++ b/fbchat/_mqtt.py @@ -146,7 +146,7 @@ class Listener: def _fetch_sequence_id(session: _session.Session) -> int: """Fetch sequence ID.""" params = { - "limit": 1, + "limit": 0, "tags": ["INBOX"], "before": None, "includeDeliveryReceipts": False, diff --git a/fbchat/_user.py b/fbchat/_user.py index 92cb53e..4ab8286 100644 --- a/fbchat/_user.py +++ b/fbchat/_user.py @@ -195,7 +195,7 @@ class UserData(User): ) -@attr.s +@attrs_default class ActiveStatus: #: Whether the user is active now active = attr.ib(None, type=bool) diff --git a/tests/test_examples.py b/tests/test_examples.py new file mode 100644 index 0000000..303b607 --- /dev/null +++ b/tests/test_examples.py @@ -0,0 +1,10 @@ +import pytest +import py_compile +import glob +from os import path + + +def test_examples_compiles(): + # Compiles the examples, to check for syntax errors + for name in glob.glob(path.join(path.dirname(__file__), "../examples", "*.py")): + py_compile.compile(name)