projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Provide totalItems field for featured collections
[akkoma]
/
lib
/
pleroma
/
workers
/
mute_expire_worker.ex
diff --git
a/lib/pleroma/workers/mute_expire_worker.ex
b/lib/pleroma/workers/mute_expire_worker.ex
index 622fdbaddfe4d8ac92b4978c0e6c8dd72ba3f093..8da903e761055f72182d07ae09d2b3b4f198283b 100644
(file)
--- 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
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.MuteExpireWorker do
use Pleroma.Workers.WorkerHelper, queue: "mute_expire"
# 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
@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
: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
:ok
end
end