!QmwrMtJYbkKKLHCnlr:federator.dev

Socialhome

57 Members
https://socialhome.network || Servers: https://the-federation.info/socialhome ||Β Code: https://gitlab.com/jaywink/socialhome || Docs: http://socialhome.readthedocs.io17 Servers

Load older messages


SenderMessageTime
25 Mar 2024
@jaywink:federator.devjaywinkIs there a clear benefit of getting rid of the json_context though, doesn't seem to add much weight? I mean if you need to, feel free if the purpose can be server otherwise20:42:45
@jaywink:federator.devjaywinkI do remember it had a bigger function before20:42:59
@alain:zenfolie.orgAlainWell, I didn't say I wanted to get rid of the json_context, it's just that I'm not getting it because it's only sent through Django views which the new UI is not using.21:06:47
@alain:zenfolie.orgAlainThe new UI only talks to the API.21:07:56
@jaywink:federator.devjaywinkyeah that makes total sense πŸ‘οΈ21:09:25
@alain:zenfolie.orgAlainThis will need a little more thinking. I want Django to give me the stream name, but I'm not sure what the best way is.21:15:24
@alain:zenfolie.orgAlainI'll dig in the drf serializers to find out if they implement a way to send some kind of out-of-band data.21:24:18
@alain:zenfolie.orgAlainOr whatever else that does what I need. πŸ™‚21:29:54
@alain:zenfolie.orgAlainI think I have some learning to do on how the streams viewsets build their responses.21:42:25
@alain:zenfolie.orgAlainI'm thinking maybe wrapping stream responses in the json_context, but that would be a breaking change.21:44:43
* @alain:zenfolie.orgAlain is thinking out loud21:47:54
@alain:zenfolie.orgAlainOr attaching the json_context at the end of the json contents array?21:54:26
@alain:zenfolie.orgAlainI was doing an inventory of the websocket endpoints the current UI is using and the tag (not tags) stream names are built with the tag id, which is currently meaningless for the UI (both current and new).22:02:06
@alain:zenfolie.orgAlainI think it's sane to have the backend provide the stream/channel names.22:03:32
26 Mar 2024
@alain:zenfolie.orgAlainHow about using a custom HTTP header? Say socialhome-channel-name? It's trivial to implement and would not break anything.15:07:13
@jaywink:federator.devjaywinkI guess that could work? Would it potentially break in some reverse proxy configs?20:24:12
@jaywink:federator.devjaywinksomething that strips headers aggressively etc hmm20:24:26
@jaywink:federator.devjaywinkis there a technical reason it can't be in the index.html or such just out of interest? I think it's a relatively common pattern to provide some bootstrapping info there, though maybe "it was a common pattern" ;)20:26:00
@alain:zenfolie.orgAlainIf you go to index.html once and then the SPA takes over, how do you get the channel name when the user clicks on other vue-router links?21:15:56
@alain:zenfolie.orgAlainBut, yeah, there's the potential header clean up by reverse proxies or webfilters.21:16:52
@alain:zenfolie.orgAlainThose that strictly follow rfc-2616.21:19:26
@alain:zenfolie.orgAlainI said it's nice to have the backend provide the channel name, but maybe we could address this differently for the SPA. Feom what I can tell, the only websocket endpoint that can't be derived from a route is the tag/<tagname> case because the backend returns tag__tagid__userid.21:26:04
@alain:zenfolie.orgAlain * I said it's nice to have the backend provide the channel name, but maybe we could address this differently for the SPA. From what I can tell, the only websocket endpoint that can't be derived from a route is the tag/<tagname> case because the backend returns tag__tagid__userid. 21:26:22
@alain:zenfolie.orgAlainAnd, unless I'm missed something, the tag ids are not sent with a tag/<tagname> stream.21:43:04
@alain:zenfolie.orgAlain * And, unless I'm missed something, the tag id is not sent with a tag/<tagname> stream. 21:43:25
@alain:zenfolie.orgAlainI guess we could make a slight mod to /api/tags by adding the tag ids and have the SPA pull the all the tags once. And the add a ws notification on tag creation.21:57:55
@alain:zenfolie.orgAlain * I guess we could make a slight mod to /api/tags by adding the tag ids and have the SPA pull the all the tags once. And then add a ws notification on tag creation.21:58:11
27 Mar 2024
@alain:zenfolie.orgAlain Nah. This would be too inefficient. 11:21:25
@jaywink:federator.devjaywinkI must admit I'm having a hard time suggesting something sane due to the code base already being a bit alien πŸ˜… 16:36:04
28 Mar 2024
@alain:zenfolie.orgAlain I'm already beginning to forget the code I wrote for Activitypub support in federation, so I hear you. πŸ˜‰ 11:29:13

There are no newer messages yet.


Back to Room ListRoom Version: 5