@@ -31,12 +31,12 @@ class UrlLauncher with GoToDraftChatMixin {
3131 ? ChromeSafariBrowser ()
3232 : null ;
3333
34- void launchUrl () {
34+ void launchUrl ({ bool isInvitationLink = false } ) {
3535 if (url! .toLowerCase ().startsWith (AppConfig .deepLinkPrefix) ||
3636 url! .toLowerCase ().startsWith (AppConfig .inviteLinkPrefix) ||
3737 {'#' , '@' , '!' , '+' , '\$ ' }.contains (url! [0 ]) ||
3838 url! .toLowerCase ().startsWith (AppConfig .schemePrefix)) {
39- return openMatrixToUrl ();
39+ return openMatrixToUrl (isInvitationLink : isInvitationLink );
4040 }
4141 final uri = Uri .tryParse (url! );
4242 if (uri == null ) {
@@ -50,7 +50,10 @@ class UrlLauncher with GoToDraftChatMixin {
5050 host: inviteUri.host,
5151 path: uri.path.replaceFirst ('/chat' , '' ),
5252 );
53- return openMatrixToUrl (matrixToUri.toString ());
53+ return openMatrixToUrl (
54+ customUrl: matrixToUri.toString (),
55+ isInvitationLink: isInvitationLink,
56+ );
5457 }
5558 if (! {'https' , 'http' }.contains (uri.scheme)) {
5659 // just launch non-https / non-http uris directly
@@ -111,7 +114,10 @@ class UrlLauncher with GoToDraftChatMixin {
111114 );
112115 }
113116
114- void openMatrixToUrl ([String ? customUrl]) async {
117+ void openMatrixToUrl ({
118+ String ? customUrl,
119+ bool isInvitationLink = false ,
120+ }) async {
115121 final matrix = Matrix .of (context);
116122 final url = (customUrl ?? this .url! ).replaceFirst (
117123 AppConfig .deepLinkPrefix,
@@ -218,6 +224,7 @@ class UrlLauncher with GoToDraftChatMixin {
218224 onContactTap (
219225 context: context,
220226 path: 'rooms' ,
227+ isInvitationLink: isInvitationLink,
221228 contactPresentationSearch: ContactPresentationSearch (
222229 matrixId: identityParts.primaryIdentifier,
223230 displayName:
0 commit comments