renaming back and reject nil on create

This commit is contained in:
Alexander Strizhakov 2020-02-26 17:50:56 +03:00
commit 20c27bef40
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
5 changed files with 35 additions and 31 deletions

View file

@ -110,7 +110,7 @@ defmodule Pleroma.Filter do
__MODULE__
|> get_active()
|> get_irreversible()
|> get_by_user(user)
|> get_filters(user)
|> compose_regex(format)
end

View file

@ -352,6 +352,7 @@ defmodule Pleroma.Notification do
end
end
@spec create_notifications(Activity.t(), keyword()) :: {:ok, [Notification.t()] | []}
def create_notifications(activity, options \\ [])
def create_notifications(%Activity{data: %{"to" => _, "type" => "Create"}} = activity, options) do

View file

@ -22,7 +22,7 @@ defmodule Pleroma.Web.MastodonAPI.FilterController do
@doc "GET /api/v1/filters"
def index(%{assigns: %{user: user}} = conn, _) do
filters = Filter.get_by_user(Filter, user)
filters = Filter.get_filters(user)
render(conn, "index.json", filters: filters)
end