feat: create accounts without HTTP request

This is supported since chatmail core version 2.23.0.
This commit is contained in:
link2xt
2026-02-18 10:34:02 +00:00
parent cf96be2cbb
commit 592116a6ed
3 changed files with 4 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ from PIL import Image, ImageDraw, ImageFont
def gen_qr_png_data(maildomain):
url = f"DCACCOUNT:https://{maildomain}/new"
url = f"DCACCOUNT:{maildomain}"
image = gen_qr(maildomain, url)
temp = io.BytesIO()
image.save(temp, format="png")

View File

@@ -22,7 +22,7 @@ def test_fastcgi_working(maildomain, chatmail_config):
@pytest.mark.filterwarnings("ignore::urllib3.exceptions.InsecureRequestWarning")
def test_newemail_configure(maildomain, rpc, chatmail_config):
"""Test configuring accounts by scanning a QR code works."""
url = f"DCACCOUNT:https://{maildomain}/new"
url = f"DCACCOUNT:{maildomain}"
for i in range(3):
account_id = rpc.add_account()
if chatmail_config.tls_cert_mode == "self":

View File

@@ -23,13 +23,13 @@ you can also **scan this QR code** with Delta Chat:
<script src="qrcode-svg.min.js"></script>
<script src="dclogin.js"></script>
{% else %}
<a class="cta-button" href="DCACCOUNT:https://{{ config.mail_domain }}/new">Get a {{config.mail_domain}} chat profile</a>
<a class="cta-button" href="DCACCOUNT:{{ config.mail_domain }}">Get a {{config.mail_domain}} chat profile</a>
If you are viewing this page on a different device
without a Delta Chat app,
you can also **scan this QR code** with Delta Chat:
<a href="DCACCOUNT:https://{{ config.mail_domain }}/new">
<a href="DCACCOUNT:{{ config.mail_domain }}">
<img width=300 style="float: none;" src="qr-chatmail-invite-{{config.mail_domain}}.png" /></a>
{% endif %}