aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/thread_mute.ex6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/thread_mute.ex b/lib/pleroma/web/thread_mute.ex
index f2283cf86..b37dda58b 100644
--- a/lib/pleroma/web/thread_mute.ex
+++ b/lib/pleroma/web/thread_mute.ex
@@ -5,7 +5,7 @@
defmodule Pleroma.Web.ThreadMute do
use Ecto.Schema
- alias Pleroma.{Activity, Notification, User}
+ alias Pleroma.{Activity, Notification, User, Repo}
schema "thread_mutes" do
belongs_to(:user, User, type: Pleroma.FlakeId)
@@ -13,9 +13,9 @@ defmodule Pleroma.Web.ThreadMute do
end
def add_mute(user, id) do
- user_id = user.id
%{data: %{"context" => context}} = Activity.get_by_id(id)
- Pleroma.Repo.insert(%Pleroma.Web.ThreadMute{}, %{user: user_id, context: context})
+ mute = %Pleroma.Web.ThreadMute{user_id: user.id, context: context}
+ Repo.insert(mute)
end
def remove_mute(user, id) do