Conversation
…uld-create-dm-with-user-who-sent-link
There was a problem hiding this comment.
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
UserInviteLinkroute + 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. |
| final result = await _startDM(); | ||
| if (!mounted) return; | ||
|
|
||
| if (result.result == null) { | ||
| context.go('/home'); | ||
| return; | ||
| } |
There was a problem hiding this comment.
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.
…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
Thank you so much for your contribution to FluffyChat ❤️❤️❤️
Pull Request has been tested on: