Show bubble_timeline in the api if any instances are set in it #502
No reviewers
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#502
Loading…
Reference in a new issue
No description provided.
Delete branch "foxing/akkoma:foxing-patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Display "bubble_timeline" in /api/v1/instance if any instances are set in the config/db.
Won't display it if none are shown to avoid other interfaces showing a blank timeline.
I have confirmed this change works on my instance, no instances set in adminfe and it will not show in the api.
Useful for external interface compatibility (even if there is none yet)
Any name for this works, I chose something that seemed sensible, but would be best to avoid setting it as "akkoma:xyz" so that other software can use the name too if they implement their own compatible bubble tl api.
@ -67,6 +67,9 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
"pleroma:api/v1/notifications:include_types_filter",
"quote_posting",
"editing",
if Config.get([:instance, :local_bubble], []) != [] do
it would probably be better to use
Enum.empty?
here, it's not recommended to check against an array literalI am not that well versed in elixir but I will have a look and try on my own instance, this was the best way I could find on my own since it should return the same if the list is empty or the config is completely undefined but the suggestion is helpful.
Ok, less complicated than I expected, I have changed it, and it does work as expected on my instance.
thanks!