You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add functions in the storage service to support this and call these functions from launchCommunity.
On the backend launchCommunity connects to the storage service and downloads the JSON object from /invite. Once the object has been retrieved, it can then use data from the invite property to connect to peers via p2p. We can also store the data in the invite property (psk, ownerOrbitDbIdentity, peerList) in the Community model when creating the community. Then we can load the CommunityMetadata into OrbitDB. See #2190 for how to do this. Then we can load the Certificates. Then we can load Channels. Then we can load the Messages. Loading the messages depends on having the channel DBs created, which is async, so perhaps we can wait on the CHANNEL_REPLICATED/CREATED event before loading messages.
And I think that should be it. I think the ‘replicated’ event fires when loading into OrbitDB, so all other event-based actions should work as if we had connected to a peer and downloaded this data.
We will need to add functions in communityMetadata.store, certificates.store, etc. for loading entries into the OrbitDB databases.
The text was updated successfully, but these errors were encountered:
Not directly connected but rather pre-work: #2493
Reason: we use similar or identical methods across all our stores so I introduced simple abstractions. This structure will ensure that we will implement all necessary functionalities in our stores.
Next step would be to add something like loadData to abstract base class.
Add functions in the storage service to support this and call these functions from launchCommunity.
On the backend launchCommunity connects to the storage service and downloads the JSON object from /invite. Once the object has been retrieved, it can then use data from the
invite
property to connect to peers via p2p. We can also store the data in theinvite
property (psk, ownerOrbitDbIdentity, peerList) in the Community model when creating the community. Then we can load the CommunityMetadata into OrbitDB. See #2190 for how to do this. Then we can load the Certificates. Then we can load Channels. Then we can load the Messages. Loading the messages depends on having the channel DBs created, which is async, so perhaps we can wait on the CHANNEL_REPLICATED/CREATED event before loading messages.And I think that should be it. I think the ‘replicated’ event fires when loading into OrbitDB, so all other event-based actions should work as if we had connected to a peer and downloaded this data.
We will need to add functions in communityMetadata.store, certificates.store, etc. for loading entries into the OrbitDB databases.
The text was updated successfully, but these errors were encountered: