metafeeds: add test cases for metafeed/announce messages
Closed this issue · 0 comments
cryptix commented
go-ssb currently doesn't plan to support upgrading from pre-MF to MF support but it would be a shame to ignore feeds created with the JS stack for instance. See the metafeed details.
Rough example is this:
- a go-ssb peer follows
@p1zza
@p1zza
starts using a new version of $client with upgrade existing capabilities@p..
therefore publishes atype: 'metafeed/announce'
message, together with creating the@metapizza
metafeed- new subfeeds announced on
@metapizza
(like chess or indexes or what not) should now be replicated by our go-ssb peer
The changes here should be adding a new testcase to the graph
package that goes through this dance and finally asserts that its subfeeds are in the hops set. So:
- create a normal (main) feed
- create a metafeed for it
- add a new
Op
type to announce a metafeed - announce it
- add some subfeeds to the metafeed
- assert that hops now has all the subfeeds
To implement this functionality I'd copy this chunk and change it to unmarshal into a new type for metafeedAnnounce
. To hook it up, the new index would be opened here but instead of the filterfunc, it can use the bytypes index like here just using metafeed/announce
instead.