ssbc / go-ssb

Go implementation of ssb (work in progress!)
https://scuttlebutt.nz
165 stars 23 forks source link

tangles.thread --reverse not working #212

Open decentral1se opened 2 years ago

decentral1se commented 2 years ago

https://github.com/Kuska-ssb/ssb/pull/30

mycognosist commented 2 years ago

Some detective work:

The tangles plugin seems to only apply the reverse flag if the live flag has been set:

https://github.com/ssbc/go-ssb/blob/master/plugins/tangles/plugin.go#L156

So maybe we want to also check for the reverse flag after the list of messages has been sorted (ie. right before they are streamed out to the caller)? Not quite sure if that's the best place but it makes sense to me.

https://github.com/ssbc/go-ssb/blob/master/plugins/tangles/plugin.go#L295

I should probably learn to write Go code lol.