WofWca
September 25, 2026, 7:10am
1
Expected behavior
You know what an invite link does (group invite, contact, etc) based on its text, without having to install/open Delta Chat and click on it.
Actual behavior
Links are not really human-readable.
I suggest this as an alternative (or an addition) to More detailed chat invite link preview .
Take a look at how links look currently: https://i.delta.chat/#F565A77295ADB383DE07BD7657CD1F9E8BB79431&v=3&i=p3nnrZMx-S7HNJ-ORZExzNsA&s=oXyyxAcIht1JWAcA-zpZdeti&a=abcdefghi%40nine.testrun.org&n=Bob.
Ways to improve things, off the top of my head:
Put the important stuff at the start and not the end
Use better separators for the parts of the link, e.g. _.
(maybe?) shorten the fingerprint by base64-encoding it instead of base16.
Though arguably it’s also a human-readable thing, so maybe no.
Consider not URL-encoding the link parts, e.g. the name could be Unicode?
Not sure if it’s valid.
Here is the current code:
"https://i.delta.chat/#{fingerprint}&v=3&x={grpid}&j={invitenumber}&s={auth}&a={self_addr_urlencoded}{r_param}&n={self_name_urlencoded}&b={chat_name_urlencoded}",
)
} else {
format!(
"https://i.delta.chat/#{fingerprint}&v=3&x={grpid}&i={invitenumber}&s={auth}&a={self_addr_urlencoded}{r_param}&n={self_name_urlencoded}&g={chat_name_urlencoded}",
)
}
} else {
let self_name_shortened = shorten_name(&self_name, 25);
let self_name_urlencoded = utf8_percent_encode(&self_name_shortened, DISALLOWED_CHARACTERS)
.to_string()
.replace("%20", "+");
context.sync_qr_code_tokens(None).await?;
context.scheduler.interrupt_smtp().await;
format!(
"https://i.delta.chat/#{fingerprint}&v=3&i={invitenumber}&s={auth}&a={self_addr_urlencoded}{r_param}&n={self_name_urlencoded}",
link2xt
September 25, 2026, 11:43am
2
Put the important stuff at the start and not the end
In this change important text was moved to the end on purpose, to make it easy to find:
main ← r10s/slighly-nicer-invite-links
opened 10:22AM - 03 Nov 25 UTC
- sort garbage to the beginning, readable text to the end
- instead of `%20`, m… ake use of `+` to encode spaces
- shorter invite links and smaller QR codes by truncation of the names - we do truncation by adding `..` percent encoded - not nice again, however, having a dot at the end of a URL is a call for trouble on linkifier (even though one can argue that a missed dot is okayish)
the truncation of the name uses chars() which does not respect utf-8, so that last character may be wrong. not sure if there is a nice and easy alternative, but maybe it's good engoug - the real, full name will come over the wire (exiting truncate() truncates on word boundaries, which is maybe too soft here - names may be long, depending on the language, and not contain any space)
moreover, this resolves the "name too long" issue from https://github.com/chatmail/core/issues/7015 (not saying, we really should put in the name to group invites tho)
Another similar improvement would be to render the DeltaChat links as a button when inside DeltaChat chats. Like “Chat with XYZ” or “Join group XYZ”.
Something similar is already shown after you click the link but I think it would be nice to render the links directly as a nice button.