Sure, we have entire PieFed at our disposal...Another option would be to add some common funtionality within a separate plugin interface. I guess we have to poke a bit at it and see where this is going to lead.
Eventually we should give this more structure, yes. I think I'm kind of fine if this isn't beginner friendly yet, my code-quality here isn't exactly what's supposed to be in PieFed and it prevents people from copy-pasting it without reading. I'll do better once it's more than just explorative.
I picked kind of an unfortunate/messy example here. add_post / Post.new are kind of duplicate code, but for specific cases. And then everything is nested and does stuff in several places and we got all the additional complexity with what goes into a celery task and what's called directly... And then flairs got added to one function but not to another one... I guess this attempt wouldn't be as messy if handling posts were few, instead more general functions and we'd abstract the Celery stuff away...