test: use QR codes to setup contact with test bots

This commit is contained in:
link2xt
2025-04-06 09:28:20 +00:00
parent 0e874735ac
commit 07946a18c3
3 changed files with 11 additions and 4 deletions

View File

@@ -55,6 +55,8 @@ def run_cmdline(argv=None, account_plugins=None):
args = parser.parse_args(argv[1:])
ac = Account(args.db)
qr = ac.get_setup_contact_qr()
print(qr)
ac.run_account(addr=args.email, password=args.password, account_plugins=account_plugins, show_ffi=args.show_ffi)

View File

@@ -649,6 +649,9 @@ class BotProcess:
def __init__(self, popen, addr) -> None:
self.popen = popen
# The first thing the bot prints to stdout is an invite link.
self.qr = self.popen.stdout.readline()
self.addr = addr
# we read stdout as quickly as we can in a thread and make