Caught myself making Lwa very specific to itself. Instead, I’m going to work to make the front-end rely solely on the Microsub spec (that way I can start testing things now). This will also let me experiment with a real-time communication extension.
I’m thinking of it being something like a new key in the channel object called
subscriptions. It can be a list of one or more strings. It should always include the Microsub endpoint itself with a URL crafted to the timeline action to fetch the latest items. The next item could be a WebSocket URL that’d give information on the type of call needed to fetch. It’d get a bit tricky but we can assume that if the socket requires an authorization token, it would be one of the parameters sent over in a JSON payload to the server.
So like the channel response would be something like:
And an example request up to get information would be:
This call (without cursors) could trigger And since responses just come whenever they want, we’d need the server to annotate them a bit. So a response would have add the same parameter used when making the ‘subscription’. A response would look something like this:
This could be even used to send information about mutes, blocks and what not implicitly - by subscribing to a channel, that kind of information should be pushed down. This is still kind of hypothetical and I’m a few weeks out from putting this in Lwa but I’ll be sure to show it off then.l
I’d love to know if there’s kind of prior art around this.