Merge remote-tracking branch 'upstream/develop' into neckbeard
This commit is contained in:
commit
7d53827785
|
@ -217,7 +217,7 @@ amd64-musl:
|
||||||
cache: *release-cache
|
cache: *release-cache
|
||||||
variables: *release-variables
|
variables: *release-variables
|
||||||
before_script: &before-release-musl
|
before_script: &before-release-musl
|
||||||
- apk add git gcc g++ musl-dev make cmake
|
- apk add git gcc g++ musl-dev make cmake file-dev
|
||||||
- echo "import Mix.Config" > config/prod.secret.exs
|
- echo "import Mix.Config" > config/prod.secret.exs
|
||||||
- mix local.hex --force
|
- mix local.hex --force
|
||||||
- mix local.rebar --force
|
- mix local.rebar --force
|
||||||
|
|
|
@ -829,13 +829,7 @@ config :pleroma, :config_description, [
|
||||||
key: :autofollowed_nicknames,
|
key: :autofollowed_nicknames,
|
||||||
type: {:list, :string},
|
type: {:list, :string},
|
||||||
description:
|
description:
|
||||||
"Set to nicknames of (local) users that every new user should automatically follow",
|
"Set to nicknames of (local) users that every new user should automatically follow"
|
||||||
suggestions: [
|
|
||||||
"lain",
|
|
||||||
"kaniini",
|
|
||||||
"lanodan",
|
|
||||||
"rinpatch"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
%{
|
%{
|
||||||
key: :attachment_links,
|
key: :attachment_links,
|
||||||
|
|
|
@ -827,7 +827,14 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
query =
|
query =
|
||||||
from([activity] in query,
|
from([activity] in query,
|
||||||
where: fragment("not (? = ANY(?))", activity.actor, ^mutes),
|
where: fragment("not (? = ANY(?))", activity.actor, ^mutes),
|
||||||
where: fragment("not (?->'to' \\?| ?)", activity.data, ^mutes)
|
where:
|
||||||
|
fragment(
|
||||||
|
"not (?->'to' \\?| ?) or ? = ?",
|
||||||
|
activity.data,
|
||||||
|
^mutes,
|
||||||
|
activity.actor,
|
||||||
|
^user.ap_id
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
unless opts[:skip_preload] do
|
unless opts[:skip_preload] do
|
||||||
|
|
|
@ -752,6 +752,22 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
||||||
refute repeat_activity in activities
|
refute repeat_activity in activities
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "returns your own posts regardless of mute" do
|
||||||
|
user = insert(:user)
|
||||||
|
muted = insert(:user)
|
||||||
|
|
||||||
|
{:ok, muted_post} = CommonAPI.post(muted, %{status: "Im stupid"})
|
||||||
|
|
||||||
|
{:ok, reply} =
|
||||||
|
CommonAPI.post(user, %{status: "I'm muting you", in_reply_to_status_id: muted_post.id})
|
||||||
|
|
||||||
|
{:ok, _} = User.mute(user, muted)
|
||||||
|
|
||||||
|
[activity] = ActivityPub.fetch_activities([], %{muting_user: user, skip_preload: true})
|
||||||
|
|
||||||
|
assert activity.id == reply.id
|
||||||
|
end
|
||||||
|
|
||||||
test "doesn't return muted activities" do
|
test "doesn't return muted activities" do
|
||||||
activity_one = insert(:note_activity)
|
activity_one = insert(:note_activity)
|
||||||
activity_two = insert(:note_activity)
|
activity_two = insert(:note_activity)
|
||||||
|
|
Loading…
Reference in New Issue