include local instance in bubble timeline #117

Merged
floatingghost merged 2 commits from bubble-include-local into develop 2022-07-26 12:22:50 +00:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit a948a57162 - Show all commits

View file

@ -129,10 +129,10 @@ defmodule Pleroma.Web.MastodonAPI.TimelineController do
# GET /api/v1/timelines/bubble
def bubble(%{assigns: %{user: user}} = conn, params) do
bubble_instances =
Enum.uniq([
Enum.uniq(
Config.get([:instance, :local_bubble], []) ++
[Pleroma.Web.Endpoint.host()]
])
)
if is_nil(user) do
fail_on_bad_auth(conn)

View file

@ -999,7 +999,8 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do
test "filtering", %{conn: conn, user: user} do
clear_config([:instance, :local_bubble], [])
local_user = insert(:user)
# our endpoint host has a port in it so let's set the AP ID
local_user = insert(:user, %{ap_id: "https://localhost/users/user"})
remote_user = insert(:user, %{ap_id: "https://example.com/users/remote_user"})
{:ok, user, local_user} = User.follow(user, local_user)
{:ok, _user, remote_user} = User.follow(user, remote_user)