quiet icon indicating copy to clipboard operation
quiet copied to clipboard

QSS: Add relay server parameter to CREATE/LAUNCH_COMMUNITY

Open leblowl opened this issue 1 year ago • 1 comments

We can add a new field to the Community model, storageServiceInviteUrl for the relay service URL. At some point we can also add inviterOnionAddress or similar for the inviter’s onion address when we get to integrating that, but we can deal with that later. I think adding things to the Community model is easy for now, but we may want to separate this data out into its own InviteData model or something at some point.

We can also add storageServiceInviteUrl to the CreateNetworkPayload and pass it from deepLinkSaga and customProtocolSaga to the createNetworkSaga. createNetworkSaga saves it in the Community data model currently. Then launchCommunitySaga can include it in the InitCommunityPayload when calling LAUNCH_COMMUNITY. On the backend launchCommunity can connect to the storage service with storageServiceInviteUrl and then use the returned data to connect to peers as usual. It can also store these pieces of data in IndexDB as usual.

launchCommunity can return a Community object with the community ID, PSK, ownerOrbitDBIdentity and peer list and then the frontend can update its state with these pieces of data.

Once this is in place, we can remove the DOWNLOAD_INVITE_DATA event.

leblowl avatar Feb 21 '24 17:02 leblowl

https://github.com/TryQuiet/quiet/pull/2438

EmiM avatar Apr 15 '24 18:04 EmiM