Show bubble_timeline in the api if any instances are set in it #502

Merged
floatingghost merged 4 commits from foxing/akkoma:foxing-patch-1 into develop 2023-03-21 10:13:42 +00:00

View file

@ -67,6 +67,9 @@ def features do
"pleroma:api/v1/notifications:include_types_filter",
"quote_posting",
"editing",
if !Enum.empty?(Config.get([:instance, :local_bubble], [])) do
foxing marked this conversation as resolved Outdated

it would probably be better to use Enum.empty? here, it's not recommended to check against an array literal

it would probably be better to use `Enum.empty?` here, it's not recommended to check against an array literal

I 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.

I 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.

Ok, less complicated than I expected, I have changed it, and it does work as expected on my instance.
"bubble_timeline"
end,
if Config.get([:media_proxy, :enabled]) do
"media_proxy"
end,