Merge remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue
[akkoma] / lib / pleroma / workers / transmogrifier_worker.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Workers.TransmogrifierWorker do
6 alias Pleroma.User
7
8 use Pleroma.Workers.WorkerHelper, queue: "transmogrifier"
9
10 @impl Oban.Worker
11 def perform(%{"op" => "user_upgrade", "user_id" => user_id}, _job) do
12 user = User.get_cached_by_id(user_id)
13 Pleroma.Web.ActivityPub.Transmogrifier.perform(:user_upgrade, user)
14 end
15 end