Split Federation as separate context

This commit is contained in:
rustra
2020-01-22 02:14:42 +01:00
parent f70af917f9
commit cdb520a95b
83 changed files with 323 additions and 253 deletions

View File

@@ -3,10 +3,12 @@ defmodule MobilizonWeb.Cache.ActivityPub do
The ActivityPub related functions.
"""
alias Mobilizon.{Actors, Events, Service, Tombstone}
alias Mobilizon.{Actors, Events, Tombstone}
alias Mobilizon.Actors.Actor
alias Mobilizon.Events.{Comment, Event}
alias Service.ActivityPub
alias Mobilizon.Federation.ActivityPub.Relay
alias MobilizonWeb.Router.Helpers, as: Routes
alias MobilizonWeb.Endpoint
@@ -73,6 +75,6 @@ defmodule MobilizonWeb.Cache.ActivityPub do
"""
@spec get_relay :: {:commit, Actor.t()} | {:ignore, nil}
def get_relay do
Cachex.fetch(@cache, "relay_actor", &ActivityPub.Relay.get_actor/0)
Cachex.fetch(@cache, "relay_actor", &Relay.get_actor/0)
end
end