Skip to content

feat: add custom route to invite user and automatically start DM#6255

Merged
ggurdin merged 4 commits intomainfrom
6248-share-invite-link-in-direct-message-should-create-dm-with-user-who-sent-link
Apr 9, 2026
Merged

feat: add custom route to invite user and automatically start DM#6255
ggurdin merged 4 commits intomainfrom
6248-share-invite-link-in-direct-message-should-create-dm-with-user-who-sent-link

Conversation

@ggurdin
Copy link
Copy Markdown
Collaborator

@ggurdin ggurdin commented Apr 3, 2026

Thank you so much for your contribution to FluffyChat ❤️❤️❤️

Pull Request has been tested on:

  • Android
  • iOS
  • Browser (Chromium based)
  • Browser (Firefox based)
  • Browser (WebKit based)
  • Desktop Linux
  • Desktop Windows
  • Desktop macOS

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a custom deep link route (/invite_user/:userID) so users can share an invite URL that, when opened, automatically creates/opens a direct message with the inviter (including a logged-out flow via cached storage).

Changes:

  • Update invite sharing to generate a deep link to /#/invite_user/<mxid>.
  • Add UserInviteLink route + page to start a DM (or cache the mxid until login).
  • Start a DM on app load when a cached invite user ID exists.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/utils/fluffy_share.dart Changes the shared invite text to a deep link that encodes the inviter’s mxid.
lib/pangea/user/user_invite_link_repo.dart Adds GetStorage-backed persistence for an “invite user” mxid across login.
lib/pangea/user/user_invite_link_page.dart Introduces the route handler page that triggers DM creation or caches the mxid when logged out.
lib/pages/chat_list/chat_list.dart On first sync, reads cached invite mxid and creates/opens the DM.
lib/main.dart Initializes the new GetStorage box (user_invite_storage).
lib/config/routes.dart Registers the new GoRouter path /invite_user/:userID.

Comment thread lib/pages/chat_list/chat_list.dart
Comment thread lib/pangea/user/user_invite_link_page.dart Outdated
Comment on lines +39 to +45
final result = await _startDM();
if (!mounted) return;

if (result.result == null) {
context.go('/home');
return;
}
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When _startDM() fails, initState treats it the same as a null result and redirects to /home without surfacing the error to the user (and the widget builds an empty SizedBox, so the screen is blank while the request runs). Consider using showFutureLoadingDialog (as in ChatListController) or otherwise showing progress + an actionable error instead of silently bouncing to home.

Copilot uses AI. Check for mistakes.
Comment thread lib/pangea/user/user_invite_link_repo.dart Outdated
ggurdin added 2 commits April 9, 2026 13:57
…dm-with-user-who-sent-link' of https://github.com/pangeachat/client into 6248-share-invite-link-in-direct-message-should-create-dm-with-user-who-sent-link
@ggurdin ggurdin merged commit cc7e34c into main Apr 9, 2026
5 of 6 checks passed
@ggurdin ggurdin deleted the 6248-share-invite-link-in-direct-message-should-create-dm-with-user-who-sent-link branch April 9, 2026 17:58
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.

"Share Invite Link" in direct message should create DM with user who sent Link

2 participants