This repository has been archived by the owner on Jul 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Implements sameAs to use Rotonde from multiple machines #159
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this commit adds the ability to read the sameAs attribute of portal.json portal.sameAs is an array of portal dat:// addresses that state that this portal is the same as those portals, and that we should load their messages under our name this makes it possible to effectively post to the same account from different machines note: port_1 needs to have port_2 in its sameAs array, and port_2 needs to have port_1 in its sameAs array, i.e. the relationship needs to be mutual
this adds a bit of kludge to portal.js, but it was the simplest way i could see of making it possible to render the same icon for remotes as the source of the remotes
Add very basic "event" handling in Portal.js; Build sameAs on it
for each portal in sameAs, we add their list of ports to our feed
has_hash should maybe have some harder checks, what happened was this.json.sameAs didn't exist but has_hash still went through (kinda strange) and so the resulting bool wasn't a bool, but undefined!
Madness |
Wow, GitHub just automatically mirrors our comments here! Also, 🎉 great work! |
Has @pfrazee seen this? |
Who wants to have the honour of pressing merge? |
I'm imagining you two staring with a dead-serious glaze at the screen, cursor over the merge button, finger over the mouse button... 🍿 |
Just read the high level description, looks like a solid solution. |
I got Paul's blessing, I'm merging. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As described in #147
sameAs
is an extension to portal.json.It adds an array
sameAs
that contains entries to other portals. If those portals in turn have your portal in theirsameAs
arrays, you are considered remotes of each other.The entire point is to decouple your Rotonde portal from a single machine. Using this feature you can now:
Start using it:
If your main portal is
dat://7f2ee...0c5/
and your work computer has a portal atdat://3ba71...829/
dat://7f2ee...0c5/
and runmirror dat://3ba71...829/
dat://3ba71...829/
and runmirror dat://7f2ee...0c5/
Remove remotes using the unmirror command:
unmirror dat://7f2ee...0c5/
this severs the link between remotes.Thanks to @0x0ade for some back and forth across twitter, rotonde and github! :~