fix(ui): per-bot invite caption + friendly self-redeem note
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 12s
CI / ui (pull_request) Successful in 47s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 57s

- The share caption is now in the bot's language: 'Давай играть в Эрудит!' (ru bot),
  "Let's play Scrabble!" (en bot) — picked by the session service language, not the
  interface language.
- Redeeming your own invite (deep link or manual) no longer shows the scary
  'can't do that to yourself' error; it shows a friendly neutral note instead.
This commit is contained in:
Ilia Denisov
2026-06-15 16:09:10 +02:00
parent 03eb8044ff
commit 01d2d1f368
4 changed files with 26 additions and 9 deletions
+7 -1
View File
@@ -493,7 +493,13 @@ async function routeStartParam(param: string): Promise<void> {
showToast(t('friends.added', { name: friend.displayName }));
void refreshNotifications();
} catch (err) {
handleError(err);
// Tapping your own invite link redeems your own code: show a friendly note, not
// the scary "can't do that to yourself" error.
if (err instanceof GatewayError && err.code === 'self_relation') {
showToast(t('friends.selfInvite'));
} else {
handleError(err);
}
}
return;
default: