Conversations: Add mix task to 'import' old DMs.
[akkoma] / lib / mix / tasks / pleroma / conversations.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Mix.Tasks.Pleroma.Conversations do
6 use Mix.Task
7 alias Mix.Tasks.Pleroma.Common
8 alias Pleroma.Conversation
9
10 @shortdoc "Manages Pleroma users"
11 @moduledoc """
12 Manages Pleroma conversations.
13
14 ## Create a conversation for all existing DMs. Can be safely re-run.
15
16 mix pleroma.conversations bump_all
17
18 """
19 def run(["bump_all"]) do
20 Common.start_pleroma()
21 Conversation.bump_for_all_activities()
22 end
23 end