feat: open mail from push notification clicks

This commit is contained in:
Linus Rath
2026-05-01 02:13:25 +02:00
parent 3f97e6ed8d
commit 31d17098d6
2 changed files with 41 additions and 1 deletions
+4 -1
View File
@@ -141,5 +141,8 @@ function buildClickUrl(data) {
if (data.kind === "email" && data.emailId) {
return `/?email=${encodeURIComponent(data.emailId)}`;
}
return "/";
// Generic "New mail" toast (preview API failed or returned no email): land
// the user on the latest unread message in their Inbox rather than just the
// app shell, so the click still feels purposeful.
return "/?openLatestUnread=1";
}