Merge remote-tracking branch 'pleroma/develop' into feature/disable-account
This commit is contained in:
commit
1557b99beb
107 changed files with 2297 additions and 616 deletions
|
|
@ -14,6 +14,8 @@ defmodule Pleroma.Activity do
|
|||
import Ecto.Query
|
||||
|
||||
@type t :: %__MODULE__{}
|
||||
@type actor :: String.t()
|
||||
|
||||
@primary_key {:id, Pleroma.FlakeId, autogenerate: true}
|
||||
|
||||
# https://github.com/tootsuite/mastodon/blob/master/app/models/notification.rb#L19
|
||||
|
|
@ -265,6 +267,11 @@ defmodule Pleroma.Activity do
|
|||
|> Repo.all()
|
||||
end
|
||||
|
||||
@spec query_by_actor(actor()) :: Ecto.Query.t()
|
||||
def query_by_actor(actor) do
|
||||
from(a in Activity, where: a.actor == ^actor)
|
||||
end
|
||||
|
||||
def restrict_deactivated_users(query) do
|
||||
from(activity in query,
|
||||
where:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue