From 9faeb7cdce4fe33e27404acbc0e513b5fea455aa Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 30 Apr 2024 11:18:44 +0200 Subject: [PATCH] fix: invite links don't work; simply return openpgp4fpr instead --- src/team_bot/commands.py | 4 +--- tests/test_bot.py | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/team_bot/commands.py b/src/team_bot/commands.py index 907c3b0..dd23d33 100644 --- a/src/team_bot/commands.py +++ b/src/team_bot/commands.py @@ -69,9 +69,7 @@ def generate_invite(account: deltachat.Account) -> str: :return: the invite link, e.g.: https://i.delta.chat """ - openpgp4fpr = account.get_setup_contact_qr() - invite = "https://i.delta.chat/#" + openpgp4fpr[12::] - return invite + return account.get_setup_contact_qr() def start_chat( diff --git a/tests/test_bot.py b/tests/test_bot.py index 8034513..b5937c1 100644 --- a/tests/test_bot.py +++ b/tests/test_bot.py @@ -278,11 +278,11 @@ def test_public_invite(relaycrew, outsider): crew.send_text("/generate-invite") result = relaycrew.user._evtracker.wait_next_incoming_message() # assert result.filename - assert result.text.startswith("https://i.delta.chat") + # assert result.text.startswith("https://i.delta.chat") # qr = result.filename - invite = "OPENPGP4FPR:" + result.text[22::] - chat = outsider.qr_setup_contact(invite) + # invite = "OPENPGP4FPR:" + result.text[22::] + chat = outsider.qr_setup_contact(result.text) outsider._evtracker.wait_securejoin_joiner_progress(1000) while not chat.is_protected():