I am not a particularly good coder. As such take these as a suggestion of what could be, not what is happening! If this were to be accepted, it would need to be adopted by all the SSB clients (ssb-server, manyverse, etc). Also, this may be extremely simplistic and may produce far too many messages to the pool very quickly!
I asked on the Scuttlebutt IRC channel, and it was suggested that @MixMix might be interested in this?
This proposal will assume there are three participating SameAs devices ("actors"):
- laptop
- phone
- tablet
It also assumes that there is at least two other peers ("actors") that observes this:
- friend-peer
- follower-peer
-
The first SameAs device (Laptop) creates a SameAs invite, and shares in, pub-invite-like to the second device (Phone).
-
Phone enters the invite, which ensures that Laptop and Phone trust each other, follow each other, and confirm they are in-fact, SameAs.
-
Phone and Laptop both send a SameAs message for the opposing member.
-
(optional) Phone and Laptop sync following/blocking/ignoring/SameAs lists and ensure both are following/etc. the same peers.
-
One of the two SameAs devices (Laptop) creates a new SameAs invite and sends it to Tablet (but the reverse could also be true - i.e. Tablet could send an invite to Laptop).
-
Tablet accepts the SameAs invite and syncs with Laptop, and observes there is a SameAs peer. As Laptop and Phone are considered SameAs, Tablet also becomes SameAs Phone, because it syncs with Laptop.
-
Tablet and Laptop both send a SameAs message. Phone observes the SameAs message and sends a SameAs message too.
-
Friend-peer (who is friend-of Laptop) sees two SameAs messages about Tablet and Phone and automatically follows both devices. Tablet and Phone have both also sent follow messages to Friend-peer, because they have sync'd state with Laptop.
-
Follower-peer (who follows Phone) sees two SameAs messages about Laptop and Tablet. It automatically follows both Laptop and Tablet because it trusts the message from Phone.
-
Follower-peer disagrees with messages from Tablet, and so blocks Tablet. Follower-peer has a record of the SameAs message about Laptop and Phone so blocks both of those devices too.
-
Tablet is sold (lost, stolen, broken, etc), and Laptop realises they forgot to revoke the SameAs. They can send a de-invite message, which is seen by all SameAs peers (Phone) who also de-invite Tablet. If Tablet is recovered, it MUST go through the SameAs process again, as all participants will see it as no longer being SameAs.
-
Eve wants to be treated as SameAs Phone, so broadcasts a SameAs Phone message. Friend-peer looks for a matching SameAs message from Phone but doesn't see it. Until the SameAs message is seen by Phone too, it is not treated as SameAs.
Thoughts?