hey @cinnamon
If we decide that the newest about message always wins*, the way to edit an about message (such as a bookmark) is just to publish another copy of it to supersede your old ones.
*for a given user and target ref
ssb-about
(which is used by Patchwork and Patchbay) already works this way.
in more detail, it uses flumeview-reduce
to read all the messages you have in your database and creates an object that stores the latest about message result for each targetId -> field -> authorId
. this is serialized to ~/.ssb/flume/about.json
.
so to find the latest name for me by everyone, where value
is the latest reduced value, the target of the about messages is my public key, and the field is "about"
: i'd go value['@6ilZq3kN0F+dXFHAPjAwMm87JEb/VdB+LC9eIMW3sa0=.ed25519'].name
and receive an object where the keys are authors and the values are their latest names for me.
or in the command-line with jq
:
cat ~/.ssb/flume/about.json | jq -r . | jq '.value."@6ilZq3kN0F+dXFHAPjAwMm87JEb/VdB+LC9eIMW3sa0=.ed25519".name'
Having a chain of about-about-about messages referring to each other feels more complicated to me. What happens if you make a tree shape instead of a linear chain?
sorry i didn't mean a chain of about-about-about messages referring to each other, i meant a set of about messages that all refer to a single message. to update a field value (for example: updating your name, or updating your name for someone else, or updating the tags on a bookmark), you post a new about message which references the target message, which includes the key you want to update with the next value.
Are there any docs describing the assumptions around each of the message types? I see this on ssbc.github.io but it's incomplete. I'd like to see how each message type is typically flume-reduced.
as mentioned in %zI07XPN..., i'd recommend checking out ssb-about
, ssb-friends
, ssb-backlinks
, patchwork/sbot/subscriptions
, patchwork/sbot/channels