X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fworkers%2Fmute_expire_worker.ex;h=8da903e761055f72182d07ae09d2b3b4f198283b;hb=46948537664a4296e7d5c517cbdbf3adccef1272;hp=622fdbaddfe4d8ac92b4978c0e6c8dd72ba3f093;hpb=e3f845b24363cd867ab85b7297f2d34bfa16b13f;p=akkoma
diff --git a/lib/pleroma/workers/mute_expire_worker.ex b/lib/pleroma/workers/mute_expire_worker.ex
index 622fdbadd..8da903e76 100644
--- a/lib/pleroma/workers/mute_expire_worker.ex
+++ b/lib/pleroma/workers/mute_expire_worker.ex
@@ -1,26 +1,20 @@
# 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
use Pleroma.Workers.WorkerHelper, queue: "mute_expire"
- require Logger
-
@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