mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
feat: create accounts without HTTP request
This is supported since chatmail core version 2.23.0.
This commit is contained in:
@@ -7,7 +7,7 @@ from PIL import Image, ImageDraw, ImageFont
|
|||||||
|
|
||||||
|
|
||||||
def gen_qr_png_data(maildomain):
|
def gen_qr_png_data(maildomain):
|
||||||
url = f"DCACCOUNT:https://{maildomain}/new"
|
url = f"DCACCOUNT:{maildomain}"
|
||||||
image = gen_qr(maildomain, url)
|
image = gen_qr(maildomain, url)
|
||||||
temp = io.BytesIO()
|
temp = io.BytesIO()
|
||||||
image.save(temp, format="png")
|
image.save(temp, format="png")
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ def test_fastcgi_working(maildomain, chatmail_config):
|
|||||||
@pytest.mark.filterwarnings("ignore::urllib3.exceptions.InsecureRequestWarning")
|
@pytest.mark.filterwarnings("ignore::urllib3.exceptions.InsecureRequestWarning")
|
||||||
def test_newemail_configure(maildomain, rpc, chatmail_config):
|
def test_newemail_configure(maildomain, rpc, chatmail_config):
|
||||||
"""Test configuring accounts by scanning a QR code works."""
|
"""Test configuring accounts by scanning a QR code works."""
|
||||||
url = f"DCACCOUNT:https://{maildomain}/new"
|
url = f"DCACCOUNT:{maildomain}"
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
account_id = rpc.add_account()
|
account_id = rpc.add_account()
|
||||||
if chatmail_config.tls_cert_mode == "self":
|
if chatmail_config.tls_cert_mode == "self":
|
||||||
|
|||||||
@@ -23,13 +23,13 @@ you can also **scan this QR code** with Delta Chat:
|
|||||||
<script src="qrcode-svg.min.js"></script>
|
<script src="qrcode-svg.min.js"></script>
|
||||||
<script src="dclogin.js"></script>
|
<script src="dclogin.js"></script>
|
||||||
{% else %}
|
{% 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
|
If you are viewing this page on a different device
|
||||||
without a Delta Chat app,
|
without a Delta Chat app,
|
||||||
you can also **scan this QR code** with Delta Chat:
|
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>
|
<img width=300 style="float: none;" src="qr-chatmail-invite-{{config.mail_domain}}.png" /></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user