From 686cfced29301a1d6cfca788f46441a7b2777f00 Mon Sep 17 00:00:00 2001 From: hkc Date: Sun, 2 Jul 2023 20:35:03 +0300 Subject: [PATCH] Allowed "all" to be used as user selector --- mastoposter/__main__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mastoposter/__main__.py b/mastoposter/__main__.py index aafccd9..24188e8 100644 --- a/mastoposter/__main__.py +++ b/mastoposter/__main__.py @@ -71,7 +71,7 @@ async def listen( async for status in source(**kwargs): logger.info("New status: %s", status.uri) logger.debug("Got status: %r", status) - if status.account.id != user: + if status.account.id != user and user != "all": logger.info( "Skipping status %s (account.id=%r != %r)", status.uri, @@ -132,8 +132,7 @@ def main(): VERIFY_CREDS_TEMPLATE.format(**conf["main"]), params={"access_token": conf["main"]["token"]}, ) - account = Account.from_dict(rq.json()) - user_id = account.id + user_id = Account.from_dict(rq.json()).id logger.info("account.id=%s", user_id)