X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fworkers%2Fmute_expire_worker.ex;h=8da903e761055f72182d07ae09d2b3b4f198283b;hb=d5263bfcf37cb1f6190d0848c6b417d33d8fb979;hp=c8b44894e91f9a110e66329a10a9da98feb75e1a;hpb=4987ee6256c4227793240c74043845a661e3d37b;p=akkoma
diff --git a/lib/pleroma/workers/mute_expire_worker.ex b/lib/pleroma/workers/mute_expire_worker.ex
index c8b44894e..8da903e76 100644
--- a/lib/pleroma/workers/mute_expire_worker.ex
+++ b/lib/pleroma/workers/mute_expire_worker.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.MuteExpireWorker do
@@ -7,18 +7,14 @@ defmodule Pleroma.Workers.MuteExpireWorker do
@impl Oban.Worker
def perform(%Job{args: %{"op" => "unmute_user", "muter_id" => muter_id, "mutee_id" => mutee_id}}) do
- muter = Pleroma.User.get_by_id(muter_id)
- mutee = Pleroma.User.get_by_id(mutee_id)
- Pleroma.User.unmute(muter, mutee)
+ Pleroma.User.unmute(muter_id, mutee_id)
:ok
end
def perform(%Job{
args: %{"op" => "unmute_conversation", "user_id" => user_id, "activity_id" => activity_id}
}) do
- user = Pleroma.User.get_by_id(user_id)
- activity = Pleroma.Activity.get_by_id(activity_id)
- Pleroma.Web.CommonAPI.remove_mute(user, activity)
+ Pleroma.Web.CommonAPI.remove_mute(user_id, activity_id)
:ok
end
end