Skip to content
This repository has been archived by the owner on Jul 8, 2021. It is now read-only.

Implements sameAs to use Rotonde from multiple machines #159

Merged
merged 18 commits into from
Nov 23, 2017

Conversation

cblgh
Copy link
Contributor

@cblgh cblgh commented Nov 23, 2017

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 their sameAs 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:

  • see the same feed as your remotes
  • others following your portal will see the posts you make from remotes
  • mentions to either the source portal or its remotes will be visible in the mentions tab

Start using it:

If your main portal is dat://7f2ee...0c5/ and your work computer has a portal at dat://3ba71...829/

  1. Visit your main portal at dat://7f2ee...0c5/ and run mirror dat://3ba71...829/
  2. Visit your work portal at dat://3ba71...829/ and run mirror dat://7f2ee...0c5/
  3. You're done! You can now Rotonde from any of the machines with ease.

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! :~

cblgh and others added 18 commits November 22, 2017 20:23
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!
@neauoire
Copy link
Contributor

Madness

@0x0ade
Copy link
Member

0x0ade commented Nov 23, 2017

Wow, GitHub just automatically mirrors our comments here!

Also, 🎉 great work!

@neauoire
Copy link
Contributor

neauoire commented Nov 23, 2017

Has @pfrazee seen this?

@neauoire
Copy link
Contributor

Who wants to have the honour of pressing merge?

@0x0ade
Copy link
Member

0x0ade commented Nov 23, 2017

I'm imagining you two staring with a dead-serious glaze at the screen, cursor over the merge button, finger over the mouse button... 🍿

@pfrazee
Copy link

pfrazee commented Nov 23, 2017

Just read the high level description, looks like a solid solution.

@neauoire neauoire merged commit d257df6 into master Nov 23, 2017
@neauoire
Copy link
Contributor

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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants