projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'admin-config-description' into 'develop'
[akkoma]
/
lib
/
pleroma
/
filter.ex
diff --git
a/lib/pleroma/filter.ex
b/lib/pleroma/filter.ex
index 9ddc5fd6ce78352a74107b840eb4fabc2bda2c65..90457dadf8641f9c100aa067ba8678dc0ef55c60 100644
(file)
--- a/
lib/pleroma/filter.ex
+++ b/
lib/pleroma/filter.ex
@@
-1,14
+1,18
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-201
8
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-201
9
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Filter do
use Ecto.Schema
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Filter do
use Ecto.Schema
- import Ecto.{Changeset, Query}
- alias Pleroma.{User, Repo}
+
+ import Ecto.Changeset
+ import Ecto.Query
+
+ alias Pleroma.Repo
+ alias Pleroma.User
schema "filters" do
schema "filters" do
- belongs_to(:user, User)
+ belongs_to(:user, User
, type: Pleroma.FlakeId
)
field(:filter_id, :integer)
field(:hide, :boolean, default: false)
field(:whole_word, :boolean, default: true)
field(:filter_id, :integer)
field(:hide, :boolean, default: false)
field(:whole_word, :boolean, default: true)
@@
-34,7
+38,8
@@
defmodule Pleroma.Filter do
query =
from(
f in Pleroma.Filter,
query =
from(
f in Pleroma.Filter,
- where: f.user_id == ^user_id
+ where: f.user_id == ^user_id,
+ order_by: [desc: :id]
)
Repo.all(query)
)
Repo.all(query)