arj03 / ssb-browser-demo

A secure scuttlebutt client interface running in the browser
Other
58 stars 11 forks source link

Follow a channel #237

Open KyleMaas opened 3 years ago

KyleMaas commented 3 years ago

I noted Patchwork allows users to follow channels. I suppose we should probably support that, or at least support showing those follow messages. I just don't know what format the actual SSB messages are in.

KyleMaas commented 3 years ago

Looks like they're messages like this:

content: {
  channel: "channel-name",
  subscribed: true,
  type: "channel"
}
KyleMaas commented 3 years ago

Example: %PJsHSrHu/QrsjvJwg9AO5ppcDnE/XWKhd1yufoHaEEo=.sha256

arj03 commented 3 years ago

This is actually pretty nice in that it pulls in content you might be interested in without following the people directly.

KyleMaas commented 3 years ago

Content of that example message, for easier reference:

{
  "key": "%PJsHSrHu/QrsjvJwg9AO5ppcDnE/XWKhd1yufoHaEEo=.sha256",
  "value": {
    "previous": "%J2/T1Y8PBB5gUy+s46vA3Cal+8pAUTA2704AZxv1u+o=.sha256",
    "sequence": 5881,
    "author": "@MRiJ+CvDnD9ZjqunY1oy6tsk0IdbMDC4Q3tTC8riS3s=.ed25519",
    "timestamp": 1613134854338,
    "hash": "sha256",
    "content": {
      "type": "channel",
      "channel": "ssb-neon",
      "subscribed": true
    },
    "signature": "5PD/T3AMC4LabVYPtTBTSxfXfPv+Avqneh8F54XmqaidF13/bzvaAwOH8nMGQOxRqmiFMexf1O+9xYR+uKY6AA==.sig.ed25519"
  }
}