From: Karen Konou Date: Thu, 7 Feb 2019 21:38:54 +0000 (+0100) Subject: made a silly oopsie X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=7e3ec93ed0047063c54a9e2a31be803e7ec4780f;p=akkoma made a silly oopsie --- diff --git a/lib/pleroma/web/thread_mute.ex b/lib/pleroma/web/thread_mute.ex index 50a6219d1..333b26246 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,8 @@ 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}) + Repo.insert(%Pleroma.Web.ThreadMute{}, %{user_id: user.id, context: context}) end def remove_mute(user, id) do