#social 2019-06-18

2019-06-18 UTC
er1n, vitalyster, xmpp-social, ichoquo0Aigh9ie and cwebber2 joined the channel; vitalyster left the channel
#
rialtate[m]
sent a long message: rialtate[m]_2019-06-18_18:52:04.txt <https://matrix.cybre.space/_matrix/media/v1/download/cybre.space/rdOhwhoKWRjVdmVsWpyLUcrs>
Guest84_ joined the channel
#
fr33domlover
rialtate, I handle them in the same code block, option 1
#
cjslep[m]
I don't know what a "code block" is but I prefer serving HTML or ActivityStreams data at the same URI just depending on the Accept request header
#
nightpool[m]
cjslep: they're just asking from a code organization perspective
#
nightpool[m]
do you have one function that handles both or a completely separate code path for html
#
nightpool[m]
@rialtate:matrix.org: the way mastodon does it and the way I've been doing it in my small node test bench is that each route is a function and in each route there's a respond to block/anonymous function for each supported content type
#
cjslep[m]
Totally separate, HTML rendering may require more contextual data (notifications for a logged in user, etc) than the pure AS object
#
cjslep[m]
Then again, this is a low level design choice of go-fed. The library only supports AS objects, defers to the library client code for any other non-AP request