mastodon_api: Add /api/v1/preferences endpoint #625

Merged
floatingghost merged 1 commit from redstrate/akkoma:work/redstrate/preferences into develop 2023-08-12 13:59:04 +00:00
Contributor

I work on Tokodon, a fediverse client that uses the Mastodon API. I noticed that Akkoma doesn't implement the preferences API, which results in a not-so-pretty error 😄

Unfortunately, I see that not a lot of (Mastodon's) preferences are exposed in the default frontend - and the ones that are the only real one that's stored server-side is the default post visibility. This change implements this to the best of what we have, and will at least quell clients that ask for it. If anyone has any ideas of how else we can fill the data (maybe read out of the mastodon fe preferences map?) I'd appreciate ideas.

Tests for the one piece of working functionality is added as well.

I work on Tokodon, a fediverse client that uses the Mastodon API. I noticed that Akkoma doesn't implement the preferences API, which results in a not-so-pretty error 😄 Unfortunately, I see that not a lot of (Mastodon's) preferences are exposed in the default frontend - and the ones that are the only real one that's stored server-side is the default post visibility. This change implements this to the best of what we have, and will at least quell clients that ask for it. If anyone has any ideas of how else we can fill the data (maybe read out of the mastodon fe preferences map?) I'd appreciate ideas. Tests for the one piece of working functionality is added as well.

oh wowee you got this up fast, thanks! far better than us just saying "yea not supported" i guess

the code looks ok, but CI is screaming about formatting - any chance you could run "mix format" and commit those changes? i'll set the tests off to run then :dance:

oh wowee you got this up fast, thanks! far better than us just saying "yea not supported" i guess the code looks ok, but CI is screaming about formatting - any chance you could run "mix format" and commit those changes? i'll set the tests off to run then :dance:
Author
Contributor

oh wowee you got this up fast, thanks! far better than us just saying "yea not supported" i guess

the code looks ok, but CI is screaming about formatting - any chance you could run "mix format" and commit those changes? i'll set the tests off to run then :dance:

Yes I can, I was about to ask if there was some kind of auto-formatter

> oh wowee you got this up fast, thanks! far better than us just saying "yea not supported" i guess > > the code looks ok, but CI is screaming about formatting - any chance you could run "mix format" and commit those changes? i'll set the tests off to run then :dance: Yes I can, I was about to ask if there was some kind of auto-formatter
redstrate force-pushed work/redstrate/preferences from 3602022484 to c22ecac567 2023-08-12 13:28:35 +00:00 Compare
Author
Contributor

Done, should be formatted correctly now 🎉

Done, should be formatted correctly now 🎉

this seems ok - some very minor compiler warnings that i'll fix up for you (like literally "bls put this function next to others of the same name" style), but everything passes

all good here, thanks a lot!

this seems ok - some very minor compiler warnings that i'll fix up for you (like literally "bls put this function next to others of the same name" style), but everything passes all good here, thanks a lot!
floatingghost merged commit 2df7707060 into develop 2023-08-12 13:59:04 +00:00
floatingghost deleted branch work/redstrate/preferences 2023-08-12 13:59:04 +00:00
Sign in to join this conversation.
No description provided.