The original patchset allowing this is here: github.com/glitch-soc/mastodon
I've rebased it as best as I could in the attention span I could give it here: github.com/arachnist/mastodon/

How viable is it to maintain this patchset? No idea.
Will I have the attention span to maintain this patchset even for my own needs? No idea.