1
0
Fork 0

Compare commits

...

2 Commits

1 changed files with 16 additions and 6 deletions

View File

@ -64,8 +64,8 @@ async def listen(
source: Callable[..., AsyncGenerator[Status, None]], source: Callable[..., AsyncGenerator[Status, None]],
drains: List[FilteredIntegration], drains: List[FilteredIntegration],
user: str, user: str,
replies_to_other_accounts_should_not_be_skipped: bool = False,
/, /,
replies_to_other_accounts_should_not_be_skipped: bool = False,
**kwargs, **kwargs,
): ):
logger.info("Starting listening...") logger.info("Starting listening...")
@ -114,6 +114,10 @@ def main():
"--single-status", nargs="?", type=str, "--single-status", nargs="?", type=str,
help="process single status and exit" help="process single status and exit"
) )
parser.add_argument(
"--no-skip-replies", action="store_true",
help="override replies_to_other_accounts_should_not_be_skipped to true"
)
args = parser.parse_args() args = parser.parse_args()
if not args.config: if not args.config:
@ -146,14 +150,20 @@ def main():
"wss://{}/api/v1/streaming".format(conf["main"]["instance"]), "wss://{}/api/v1/streaming".format(conf["main"]["instance"]),
) )
source = websocket_source
source_params = dict(
url=url,
replies_to_other_accounts_should_not_be_skipped = conf[ replies_to_other_accounts_should_not_be_skipped = conf[
"main" "main"
].getboolean( ].getboolean(
"replies_to_other_accounts_should_not_be_skipped", False "replies_to_other_accounts_should_not_be_skipped", False
), )
if args.no_skip_replies:
replies_to_other_accounts_should_not_be_skipped = True
source = websocket_source
source_params = dict(
url=url,
replies_to_other_accounts_should_not_be_skipped=(
replies_to_other_accounts_should_not_be_skipped),
reconnect=conf["main"].getboolean("auto_reconnect", False), reconnect=conf["main"].getboolean("auto_reconnect", False),
reconnect_delay=conf["main"].getfloat("reconnect_delay", 1.0), reconnect_delay=conf["main"].getfloat("reconnect_delay", 1.0),
connect_timeout=conf["main"].getfloat("connect_timeout", 60.0), connect_timeout=conf["main"].getfloat("connect_timeout", 60.0),