Move Mobilizon.Events.Activity to Mobilizon.Service.ActivityPub.Activity

It's only used for ActivityPub stuff, nothing DB related.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2019-09-22 09:24:18 +02:00
parent 4c74248a04
commit 2d087fb810
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
17 changed files with 24 additions and 25 deletions

View File

@ -5,6 +5,7 @@ defmodule MobilizonWeb.API.Events do
alias Mobilizon.Events.Event
alias Mobilizon.Service.ActivityPub
alias Mobilizon.Service.ActivityPub.Utils, as: ActivityPubUtils
alias Mobilizon.Service.ActivityPub.Activity
alias MobilizonWeb.API.Utils
@doc """

View File

@ -9,7 +9,7 @@ defmodule MobilizonWeb.API.Reports do
alias Mobilizon.Actors
alias Mobilizon.Actors.Actor
alias Mobilizon.Events
alias Mobilizon.Events.Activity
alias Mobilizon.Service.ActivityPub.Activity
alias Mobilizon.Reports, as: ReportsAction
alias Mobilizon.Reports.{Report, Note}
alias Mobilizon.Service.ActivityPub

View File

@ -3,9 +3,9 @@ defmodule MobilizonWeb.Resolvers.Comment do
Handles the comment-related GraphQL calls
"""
alias Mobilizon.Events.{Activity, Comment}
alias Mobilizon.Events.Comment
alias Mobilizon.Users.User
alias Mobilizon.Service.ActivityPub.Activity
alias MobilizonWeb.API.Comments
require Logger

View File

@ -6,12 +6,13 @@ defmodule MobilizonWeb.Resolvers.Event do
alias Mobilizon.Addresses
alias Mobilizon.Addresses.Address
alias Mobilizon.Events
alias Mobilizon.Events.{Activity, Event, Participant}
alias Mobilizon.Events.{Event, Participant}
alias Mobilizon.Media.Picture
alias Mobilizon.Users.User
alias Mobilizon.Actors
alias Mobilizon.Actors.Actor
alias MobilizonWeb.Resolvers.Person
alias Mobilizon.Service.ActivityPub.Activity
import Mobilizon.Service.Admin.ActionLogService
# We limit the max number of events that can be retrieved

View File

@ -4,7 +4,7 @@ defmodule MobilizonWeb.Resolvers.Group do
"""
alias Mobilizon.Actors
alias Mobilizon.Actors.{Actor, Member}
alias Mobilizon.Events.Activity
alias Mobilizon.Service.ActivityPub.Activity
alias Mobilizon.Users.User
alias Mobilizon.Service.ActivityPub

View File

@ -3,7 +3,7 @@ defmodule MobilizonWeb.ActivityPub.ActorView do
alias Mobilizon.Actors
alias Mobilizon.Actors.Actor
alias Mobilizon.Events.Activity
alias Mobilizon.Service.ActivityPub.Activity
alias Mobilizon.Service.ActivityPub
alias Mobilizon.Service.ActivityPub.Utils

View File

@ -1,8 +1,7 @@
defmodule MobilizonWeb.ActivityPub.ObjectView do
use MobilizonWeb, :view
alias Mobilizon.Events.Activity
alias Mobilizon.Service.ActivityPub.Utils
alias Mobilizon.Service.ActivityPub.{Activity, Utils}
def render("activity.json", %{activity: %Activity{local: local, data: data} = activity}) do
%{

View File

@ -1,4 +1,4 @@
defmodule Mobilizon.Events.Activity do
defmodule Mobilizon.Service.ActivityPub.Activity do
@moduledoc """
Represents an activity.
"""

View File

@ -12,7 +12,7 @@ defmodule Mobilizon.Service.ActivityPub do
alias Mobilizon.Config
alias Mobilizon.Events
alias Mobilizon.Events.{Activity, Event, Comment, Participant}
alias Mobilizon.Events.{Event, Comment, Participant}
alias Mobilizon.Service.ActivityPub.Transmogrifier
alias Mobilizon.Service.WebFinger
@ -22,11 +22,10 @@ defmodule Mobilizon.Service.ActivityPub do
alias Mobilizon.Service.Federator
alias Mobilizon.Service.HTTPSignatures.Signature
alias Mobilizon.Service.ActivityPub.Convertible
alias Mobilizon.Service.ActivityPub.{Activity, Convertible}
require Logger
import Mobilizon.Service.ActivityPub.Utils
import Mobilizon.Service.ActivityPub.Visibility
import Mobilizon.Service.ActivityPub.{Utils, Visibility}
@doc """
Get recipients for an activity or object

View File

@ -10,7 +10,7 @@ defmodule Mobilizon.Service.ActivityPub.Relay do
alias Mobilizon.Actors
alias Mobilizon.Actors.Actor
alias Mobilizon.Events.Activity
alias Mobilizon.Service.ActivityPub.Activity
alias Mobilizon.Service.ActivityPub
alias MobilizonWeb.API.Follows

View File

@ -12,8 +12,7 @@ defmodule Mobilizon.Service.ActivityPub.Transmogrifier do
alias Mobilizon.Events
alias Mobilizon.Events.{Event, Comment, Participant}
alias Mobilizon.Service.ActivityPub
alias Mobilizon.Service.ActivityPub.Utils
alias Mobilizon.Service.ActivityPub.Visibility
alias Mobilizon.Service.ActivityPub.{Visibility, Utils}
require Logger

View File

@ -17,11 +17,11 @@ defmodule Mobilizon.Service.ActivityPub.Utils do
alias Mobilizon.Actors
alias Mobilizon.Actors.Actor
alias Mobilizon.Events
alias Mobilizon.Events.{Activity, Comment, Event}
alias Mobilizon.Events.{Comment, Event}
alias Mobilizon.Media.Picture
alias Mobilizon.Reports
alias Mobilizon.Reports.Report
alias Mobilizon.Service.ActivityPub.Converters
alias Mobilizon.Service.ActivityPub.{Activity, Converters}
alias Mobilizon.Storage.Repo
alias Mobilizon.Users

View File

@ -8,7 +8,7 @@ defmodule Mobilizon.Service.ActivityPub.Visibility do
Utility functions related to content visibility
"""
alias Mobilizon.Events.Activity
alias Mobilizon.Service.ActivityPub.Activity
@public "https://www.w3.org/ns/activitystreams#Public"

View File

@ -11,9 +11,8 @@ defmodule Mobilizon.Service.Federator do
use GenServer
alias Mobilizon.Actors
alias Mobilizon.Events.Activity
alias Mobilizon.Service.ActivityPub
alias Mobilizon.Service.ActivityPub.Transmogrifier
alias Mobilizon.Service.ActivityPub.{Activity, Transmogrifier}
require Logger

View File

@ -197,7 +197,7 @@ defmodule Mobilizon.Mixfile do
Mobilizon.Addresses,
Mobilizon.Addresses.Address,
Mobilizon.Events,
Mobilizon.Events.Activity,
Mobilizon.Service.ActivityPub.Activity,
Mobilizon.Events.Event,
Mobilizon.Events.Comment,
Mobilizon.Events.FeedToken,

View File

@ -11,9 +11,9 @@ defmodule Mobilizon.Service.ActivityPub.TransmogrifierTest do
alias Mobilizon.Actors
alias Mobilizon.Actors.Actor
alias Mobilizon.Events
alias Mobilizon.Events.{Activity, Comment, Event, Participant}
alias Mobilizon.Events.{Comment, Event, Participant}
alias Mobilizon.Service.ActivityPub
alias Mobilizon.Service.ActivityPub.Utils
alias Mobilizon.Service.ActivityPub.{Utils, Activity}
alias Mobilizon.Service.ActivityPub.Transmogrifier
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney

View File

@ -4,10 +4,11 @@ defmodule MobilizonWeb.API.ReportTest do
import Mobilizon.Factory
alias Mobilizon.Actors.Actor
alias Mobilizon.Events.{Activity, Comment, Event}
alias Mobilizon.Events.{Comment, Event}
alias Mobilizon.Reports.{Report, Note}
alias Mobilizon.Users
alias Mobilizon.Users.User
alias Mobilizon.Service.ActivityPub.Activity
alias MobilizonWeb.API.Reports