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:
parent
4c74248a04
commit
2d087fb810
@ -5,6 +5,7 @@ defmodule MobilizonWeb.API.Events do
|
|||||||
alias Mobilizon.Events.Event
|
alias Mobilizon.Events.Event
|
||||||
alias Mobilizon.Service.ActivityPub
|
alias Mobilizon.Service.ActivityPub
|
||||||
alias Mobilizon.Service.ActivityPub.Utils, as: ActivityPubUtils
|
alias Mobilizon.Service.ActivityPub.Utils, as: ActivityPubUtils
|
||||||
|
alias Mobilizon.Service.ActivityPub.Activity
|
||||||
alias MobilizonWeb.API.Utils
|
alias MobilizonWeb.API.Utils
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
|
@ -9,7 +9,7 @@ defmodule MobilizonWeb.API.Reports do
|
|||||||
alias Mobilizon.Actors
|
alias Mobilizon.Actors
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Events
|
alias Mobilizon.Events
|
||||||
alias Mobilizon.Events.Activity
|
alias Mobilizon.Service.ActivityPub.Activity
|
||||||
alias Mobilizon.Reports, as: ReportsAction
|
alias Mobilizon.Reports, as: ReportsAction
|
||||||
alias Mobilizon.Reports.{Report, Note}
|
alias Mobilizon.Reports.{Report, Note}
|
||||||
alias Mobilizon.Service.ActivityPub
|
alias Mobilizon.Service.ActivityPub
|
||||||
|
@ -3,9 +3,9 @@ defmodule MobilizonWeb.Resolvers.Comment do
|
|||||||
Handles the comment-related GraphQL calls
|
Handles the comment-related GraphQL calls
|
||||||
"""
|
"""
|
||||||
|
|
||||||
alias Mobilizon.Events.{Activity, Comment}
|
alias Mobilizon.Events.Comment
|
||||||
alias Mobilizon.Users.User
|
alias Mobilizon.Users.User
|
||||||
|
alias Mobilizon.Service.ActivityPub.Activity
|
||||||
alias MobilizonWeb.API.Comments
|
alias MobilizonWeb.API.Comments
|
||||||
|
|
||||||
require Logger
|
require Logger
|
||||||
|
@ -6,12 +6,13 @@ defmodule MobilizonWeb.Resolvers.Event do
|
|||||||
alias Mobilizon.Addresses
|
alias Mobilizon.Addresses
|
||||||
alias Mobilizon.Addresses.Address
|
alias Mobilizon.Addresses.Address
|
||||||
alias Mobilizon.Events
|
alias Mobilizon.Events
|
||||||
alias Mobilizon.Events.{Activity, Event, Participant}
|
alias Mobilizon.Events.{Event, Participant}
|
||||||
alias Mobilizon.Media.Picture
|
alias Mobilizon.Media.Picture
|
||||||
alias Mobilizon.Users.User
|
alias Mobilizon.Users.User
|
||||||
alias Mobilizon.Actors
|
alias Mobilizon.Actors
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias MobilizonWeb.Resolvers.Person
|
alias MobilizonWeb.Resolvers.Person
|
||||||
|
alias Mobilizon.Service.ActivityPub.Activity
|
||||||
import Mobilizon.Service.Admin.ActionLogService
|
import Mobilizon.Service.Admin.ActionLogService
|
||||||
|
|
||||||
# We limit the max number of events that can be retrieved
|
# We limit the max number of events that can be retrieved
|
||||||
|
@ -4,7 +4,7 @@ defmodule MobilizonWeb.Resolvers.Group do
|
|||||||
"""
|
"""
|
||||||
alias Mobilizon.Actors
|
alias Mobilizon.Actors
|
||||||
alias Mobilizon.Actors.{Actor, Member}
|
alias Mobilizon.Actors.{Actor, Member}
|
||||||
alias Mobilizon.Events.Activity
|
alias Mobilizon.Service.ActivityPub.Activity
|
||||||
alias Mobilizon.Users.User
|
alias Mobilizon.Users.User
|
||||||
alias Mobilizon.Service.ActivityPub
|
alias Mobilizon.Service.ActivityPub
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ defmodule MobilizonWeb.ActivityPub.ActorView do
|
|||||||
|
|
||||||
alias Mobilizon.Actors
|
alias Mobilizon.Actors
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Events.Activity
|
alias Mobilizon.Service.ActivityPub.Activity
|
||||||
alias Mobilizon.Service.ActivityPub
|
alias Mobilizon.Service.ActivityPub
|
||||||
alias Mobilizon.Service.ActivityPub.Utils
|
alias Mobilizon.Service.ActivityPub.Utils
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
defmodule MobilizonWeb.ActivityPub.ObjectView do
|
defmodule MobilizonWeb.ActivityPub.ObjectView do
|
||||||
use MobilizonWeb, :view
|
use MobilizonWeb, :view
|
||||||
|
|
||||||
alias Mobilizon.Events.Activity
|
alias Mobilizon.Service.ActivityPub.{Activity, Utils}
|
||||||
alias Mobilizon.Service.ActivityPub.Utils
|
|
||||||
|
|
||||||
def render("activity.json", %{activity: %Activity{local: local, data: data} = activity}) do
|
def render("activity.json", %{activity: %Activity{local: local, data: data} = activity}) do
|
||||||
%{
|
%{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
defmodule Mobilizon.Events.Activity do
|
defmodule Mobilizon.Service.ActivityPub.Activity do
|
||||||
@moduledoc """
|
@moduledoc """
|
||||||
Represents an activity.
|
Represents an activity.
|
||||||
"""
|
"""
|
@ -12,7 +12,7 @@ defmodule Mobilizon.Service.ActivityPub do
|
|||||||
|
|
||||||
alias Mobilizon.Config
|
alias Mobilizon.Config
|
||||||
alias Mobilizon.Events
|
alias Mobilizon.Events
|
||||||
alias Mobilizon.Events.{Activity, Event, Comment, Participant}
|
alias Mobilizon.Events.{Event, Comment, Participant}
|
||||||
alias Mobilizon.Service.ActivityPub.Transmogrifier
|
alias Mobilizon.Service.ActivityPub.Transmogrifier
|
||||||
alias Mobilizon.Service.WebFinger
|
alias Mobilizon.Service.WebFinger
|
||||||
|
|
||||||
@ -22,11 +22,10 @@ defmodule Mobilizon.Service.ActivityPub do
|
|||||||
alias Mobilizon.Service.Federator
|
alias Mobilizon.Service.Federator
|
||||||
alias Mobilizon.Service.HTTPSignatures.Signature
|
alias Mobilizon.Service.HTTPSignatures.Signature
|
||||||
|
|
||||||
alias Mobilizon.Service.ActivityPub.Convertible
|
alias Mobilizon.Service.ActivityPub.{Activity, Convertible}
|
||||||
|
|
||||||
require Logger
|
require Logger
|
||||||
import Mobilizon.Service.ActivityPub.Utils
|
import Mobilizon.Service.ActivityPub.{Utils, Visibility}
|
||||||
import Mobilizon.Service.ActivityPub.Visibility
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Get recipients for an activity or object
|
Get recipients for an activity or object
|
||||||
|
@ -10,7 +10,7 @@ defmodule Mobilizon.Service.ActivityPub.Relay do
|
|||||||
|
|
||||||
alias Mobilizon.Actors
|
alias Mobilizon.Actors
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Events.Activity
|
alias Mobilizon.Service.ActivityPub.Activity
|
||||||
alias Mobilizon.Service.ActivityPub
|
alias Mobilizon.Service.ActivityPub
|
||||||
|
|
||||||
alias MobilizonWeb.API.Follows
|
alias MobilizonWeb.API.Follows
|
||||||
|
@ -12,8 +12,7 @@ defmodule Mobilizon.Service.ActivityPub.Transmogrifier do
|
|||||||
alias Mobilizon.Events
|
alias Mobilizon.Events
|
||||||
alias Mobilizon.Events.{Event, Comment, Participant}
|
alias Mobilizon.Events.{Event, Comment, Participant}
|
||||||
alias Mobilizon.Service.ActivityPub
|
alias Mobilizon.Service.ActivityPub
|
||||||
alias Mobilizon.Service.ActivityPub.Utils
|
alias Mobilizon.Service.ActivityPub.{Visibility, Utils}
|
||||||
alias Mobilizon.Service.ActivityPub.Visibility
|
|
||||||
|
|
||||||
require Logger
|
require Logger
|
||||||
|
|
||||||
|
@ -17,11 +17,11 @@ defmodule Mobilizon.Service.ActivityPub.Utils do
|
|||||||
alias Mobilizon.Actors
|
alias Mobilizon.Actors
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Events
|
alias Mobilizon.Events
|
||||||
alias Mobilizon.Events.{Activity, Comment, Event}
|
alias Mobilizon.Events.{Comment, Event}
|
||||||
alias Mobilizon.Media.Picture
|
alias Mobilizon.Media.Picture
|
||||||
alias Mobilizon.Reports
|
alias Mobilizon.Reports
|
||||||
alias Mobilizon.Reports.Report
|
alias Mobilizon.Reports.Report
|
||||||
alias Mobilizon.Service.ActivityPub.Converters
|
alias Mobilizon.Service.ActivityPub.{Activity, Converters}
|
||||||
alias Mobilizon.Storage.Repo
|
alias Mobilizon.Storage.Repo
|
||||||
alias Mobilizon.Users
|
alias Mobilizon.Users
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ defmodule Mobilizon.Service.ActivityPub.Visibility do
|
|||||||
Utility functions related to content visibility
|
Utility functions related to content visibility
|
||||||
"""
|
"""
|
||||||
|
|
||||||
alias Mobilizon.Events.Activity
|
alias Mobilizon.Service.ActivityPub.Activity
|
||||||
|
|
||||||
@public "https://www.w3.org/ns/activitystreams#Public"
|
@public "https://www.w3.org/ns/activitystreams#Public"
|
||||||
|
|
||||||
|
@ -11,9 +11,8 @@ defmodule Mobilizon.Service.Federator do
|
|||||||
use GenServer
|
use GenServer
|
||||||
|
|
||||||
alias Mobilizon.Actors
|
alias Mobilizon.Actors
|
||||||
alias Mobilizon.Events.Activity
|
|
||||||
alias Mobilizon.Service.ActivityPub
|
alias Mobilizon.Service.ActivityPub
|
||||||
alias Mobilizon.Service.ActivityPub.Transmogrifier
|
alias Mobilizon.Service.ActivityPub.{Activity, Transmogrifier}
|
||||||
|
|
||||||
require Logger
|
require Logger
|
||||||
|
|
||||||
|
2
mix.exs
2
mix.exs
@ -197,7 +197,7 @@ defmodule Mobilizon.Mixfile do
|
|||||||
Mobilizon.Addresses,
|
Mobilizon.Addresses,
|
||||||
Mobilizon.Addresses.Address,
|
Mobilizon.Addresses.Address,
|
||||||
Mobilizon.Events,
|
Mobilizon.Events,
|
||||||
Mobilizon.Events.Activity,
|
Mobilizon.Service.ActivityPub.Activity,
|
||||||
Mobilizon.Events.Event,
|
Mobilizon.Events.Event,
|
||||||
Mobilizon.Events.Comment,
|
Mobilizon.Events.Comment,
|
||||||
Mobilizon.Events.FeedToken,
|
Mobilizon.Events.FeedToken,
|
||||||
|
@ -11,9 +11,9 @@ defmodule Mobilizon.Service.ActivityPub.TransmogrifierTest do
|
|||||||
alias Mobilizon.Actors
|
alias Mobilizon.Actors
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Events
|
alias Mobilizon.Events
|
||||||
alias Mobilizon.Events.{Activity, Comment, Event, Participant}
|
alias Mobilizon.Events.{Comment, Event, Participant}
|
||||||
alias Mobilizon.Service.ActivityPub
|
alias Mobilizon.Service.ActivityPub
|
||||||
alias Mobilizon.Service.ActivityPub.Utils
|
alias Mobilizon.Service.ActivityPub.{Utils, Activity}
|
||||||
alias Mobilizon.Service.ActivityPub.Transmogrifier
|
alias Mobilizon.Service.ActivityPub.Transmogrifier
|
||||||
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney
|
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney
|
||||||
|
|
||||||
|
@ -4,10 +4,11 @@ defmodule MobilizonWeb.API.ReportTest do
|
|||||||
import Mobilizon.Factory
|
import Mobilizon.Factory
|
||||||
|
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Events.{Activity, Comment, Event}
|
alias Mobilizon.Events.{Comment, Event}
|
||||||
alias Mobilizon.Reports.{Report, Note}
|
alias Mobilizon.Reports.{Report, Note}
|
||||||
alias Mobilizon.Users
|
alias Mobilizon.Users
|
||||||
alias Mobilizon.Users.User
|
alias Mobilizon.Users.User
|
||||||
|
alias Mobilizon.Service.ActivityPub.Activity
|
||||||
|
|
||||||
alias MobilizonWeb.API.Reports
|
alias MobilizonWeb.API.Reports
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user