Skip to content

Implement tchat invite link redirection#474

Merged
zatteo merged 4 commits intomasterfrom
feat/invite-link
Feb 26, 2026
Merged

Implement tchat invite link redirection#474
zatteo merged 4 commits intomasterfrom
feat/invite-link

Conversation

@zatteo
Copy link
Copy Markdown
Member

@zatteo zatteo commented Jan 28, 2026

For a tchat invite link, e.g. links.twake.app/chat/@JDoe:twake.app

  1. if the mobile app is installed, the app catches the redirection as it is an universal link (already working)
  2. if the mobile app is not installed
    2.1 if we are on mobile => we redirect to the relevant store page (implemented here)
    2.2 if we are on web => we redirect to sign up (implemented here)

For a tchat invite link, e.g. links.twake.app/chat/@JDoe:twake.app
1. if the mobile app is installed, the app catches the redirection as
it is an universal link (already working)
2. if the mobile app is not installed
2.1 if we are on mobile => we redirect to the relevant store page
(implemented here)
2.2 if we are on web => we redirect to sign up (next commit)

We need to manage the mobile redirection here because:
- we want to open iOS or Android relevant store page that's why we
check user agent
- we hardcode store page URL because these URL almost never changes
and we do not want to add to much data in the invite link query
string
For a tchat invite link, e.g. links.twake.app/chat/@JDoe:twake.app
1. if the mobile app is installed, the app catches the redirection as
it is an universal link (already working)
2. if the mobile app is not installed
2.1 if we are on mobile => we redirect to the relevant store page
(previous commit)
2.2 if we are on web => we redirect to sign up (implemented here)
@zatteo zatteo requested review from Crash-- and rezk2ll January 28, 2026 09:15
@zatteo
Copy link
Copy Markdown
Member Author

zatteo commented Jan 28, 2026

Still in draft because two questions for @Crash-- and @rezk2ll. In the second commit, I need to go from https://links.twake.app/chat/@jdoe:twake.app to https://chat.twake.app/web/#/chat/@jdoe:twake.app (it is the green part of the schema below).

  1. Do you have any smart idea on how to get sign up url ?
  • query string from invite link ? But we try to keep this invite link as short as possible...
  • hardcoded ? But how to select to good one sign up url ?
  • something else ?

FYI we do not support B2B invite link.

  1. @rezk2ll I remember the redirect part like in the schema is not already present in sign up, right? What do you think about the API?
Screenshot 2026-01-28 at 10 14 52

@zatteo zatteo marked this pull request as ready for review February 10, 2026 08:50
@zatteo zatteo requested a review from nono as a code owner February 10, 2026 08:50
@zatteo zatteo force-pushed the feat/invite-link branch 5 times, most recently from 55edfc4 to ca0dc9c Compare February 24, 2026 09:51
For tchat invite link, we need to redirect to the good sign up URL.

A simple and smart idea to determine it is to leverage the Matrix ID
of the send of the invite link. We can extract the domain and select
sign up URL from it.
A container app can not load user-chat.twake.app/chat/@JDoe:twake.app. We need to load user-chat.twake.app/#/bridge/web/#/chat/@JDoe:twake.app to satisfy:
- stack routing (the first #)
- container app routing (/bridge)
- tchat routing (/web/#)
@zatteo zatteo requested a review from Crash-- February 24, 2026 14:04
@zatteo
Copy link
Copy Markdown
Member Author

zatteo commented Feb 24, 2026

For 1. we decided that we can leverage Matrix ID to determine Sign Up URL: see c7359fa.

For 2. it has been implemented by @rezk2ll. With a small fix added here a8d02fb I think we are good to go.

@zatteo zatteo merged commit 665286a into master Feb 26, 2026
2 checks passed
@zatteo zatteo deleted the feat/invite-link branch February 26, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants