Conversation
Notices
-
Embed this notice
Hélène (helene@p.helene.moe)'s status on Tuesday, 06-Sep-2022 01:13:11 JST Hélène type arrays are only one step of the :hehecat: energy -
Embed this notice
tusooa :Cat_girls_Emoji_004: 西风 (tusooa@kazv.moe)'s status on Tuesday, 06-Sep-2022 01:16:14 JST tusooa :Cat_girls_Emoji_004: 西风 @helene [&t/0]?
Hélène likes this. -
Embed this notice
Hélène (helene@p.helene.moe)'s status on Tuesday, 06-Sep-2022 01:16:19 JST Hélène @tusooa activitystreams type arrays -
Embed this notice
tusooa :Cat_girls_Emoji_004: 西风 (tusooa@kazv.moe)'s status on Tuesday, 06-Sep-2022 01:17:20 JST tusooa :Cat_girls_Emoji_004: 西风 @helene :mikoto2: that's too painful Hélène likes this. -
Embed this notice
Hélène (helene@p.helene.moe)'s status on Tuesday, 06-Sep-2022 01:17:29 JST Hélène @tusooa they're good to have and a good concept! -
Embed this notice
Grillchens Tagebuch (khaosgrille@fedi.absturztau.be)'s status on Tuesday, 06-Sep-2022 01:17:51 JST Grillchens Tagebuch @helene Hélène likes this. -
Embed this notice
tusooa :Cat_girls_Emoji_004: 西风 (tusooa@kazv.moe)'s status on Tuesday, 06-Sep-2022 01:19:59 JST tusooa :Cat_girls_Emoji_004: 西风 @helene if we feed everything unconditionally into common_pipeline it would be easier Hélène likes this. -
Embed this notice
Hélène (helene@p.helene.moe)'s status on Tuesday, 06-Sep-2022 01:20:17 JST Hélène @tusooa depends what you mean by that
i think our "validators" are mostly superfluous -
Embed this notice
Hélène (helene@p.helene.moe)'s status on Tuesday, 06-Sep-2022 01:22:30 JST Hélène @tusooa how so? -
Embed this notice
tusooa :Cat_girls_Emoji_004: 西风 (tusooa@kazv.moe)'s status on Tuesday, 06-Sep-2022 01:22:31 JST tusooa :Cat_girls_Emoji_004: 西风 @helene rewrite types into single element in ObjectValidator Hélène likes this. -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Tuesday, 06-Sep-2022 01:24:16 JST Haelwenn /элвэн/ :triskell: @tusooa @helene Well AP type arrays would mean doing a data-change in the pipeline (replacing with the first known type I guess), bit ugly but at least with the pipeline it should work okay.
With old-style transmogrifier it would have been a constant pain.Hélène likes this. -
Embed this notice
tusooa :Cat_girls_Emoji_004: 西风 (tusooa@kazv.moe)'s status on Tuesday, 06-Sep-2022 01:24:21 JST tusooa :Cat_girls_Emoji_004: 西风 @helene
type |> Enum.filter(&supported/1) |> Enum.last()Hélène likes this. -
Embed this notice
ilja (ilja@ilja.space)'s status on Tuesday, 06-Sep-2022 01:29:51 JST ilja @lanodan @tusooa @helene I got a simple implementation working on my instance :hehe:
https://ilja.space/notice/ANG5xglClJo1DCLTSC
This is the object https://recipes.ilja.space/recipe/vegan-brownies.json
Admittedly, the way it's done is really just a hack and really just aimed at this specific case
diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index dc56c4d2c..c86288e78 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -359,6 +359,10 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do def handle_incoming(data, options \\ []) + def handle_incoming(%{"object" => %{"type" => [coretype, _]} = object} = data, options) do + handle_incoming(data |> Map.put("object", object |> Map.put("type", coretype)), options) + end + # Flag objects are placed ahead of the ID check because Mastodon 2.8 and earlier send them # with nil ID. def handle_incoming(%{"type" => "Flag", "object" => objects, "actor" => actor} = data, _options) doHélène likes this. -
Embed this notice
ilja (ilja@ilja.space)'s status on Tuesday, 06-Sep-2022 01:32:06 JST ilja @tusooa @helene @lanodan I don't know what you mean? Hélène likes this. -
Embed this notice
tusooa :Cat_girls_Emoji_004: 西风 (tusooa@kazv.moe)'s status on Tuesday, 06-Sep-2022 01:32:07 JST tusooa :Cat_girls_Emoji_004: 西风 @ilja @helene @lanodan there are also history... -
Embed this notice
ilja (ilja@ilja.space)'s status on Tuesday, 06-Sep-2022 01:35:23 JST ilja @tusooa @helene @lanodan I still don't understand :/ Hélène likes this. -
Embed this notice
tusooa :Cat_girls_Emoji_004: 西风 (tusooa@kazv.moe)'s status on Tuesday, 06-Sep-2022 01:35:25 JST tusooa :Cat_girls_Emoji_004: 西风 @ilja @helene @lanodan litepub:formerRepresentations -
Embed this notice
ilja (ilja@ilja.space)'s status on Tuesday, 06-Sep-2022 01:41:24 JST ilja @lanodan @tusooa @helene I think this is going over my head atm :) What's reinjection in this case?
But regardless, even if refactoring is needed, that doesn't mean it's unwanted. Having a good way to extend types like that means better interoperability without needing to implement every thing anyone ever implements. It won't work for every object (e.g. ChatMessages are very explicitly not Notes), but it can help. On the long run, I really believe this will be an improvement.Hélène likes this. -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Tuesday, 06-Sep-2022 01:41:26 JST Haelwenn /элвэн/ :triskell: @ilja @tusooa @helene I think it's about reinjection, would need to do the same modification for it.
Which I guess is yet another reason to get rid of stuff put in the Transmogrifier.
-
Embed this notice