projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for `account_id` param to filter notifications by the account
[akkoma]
/
lib
/
pleroma
/
thread_mute.ex
diff --git
a/lib/pleroma/thread_mute.ex
b/lib/pleroma/thread_mute.ex
index 0b577113d744b5b300c8446b98c463f685dae57b..65cbbede3f2ee05fafe7ee406aee87cf1dee2560 100644
(file)
--- a/
lib/pleroma/thread_mute.ex
+++ b/
lib/pleroma/thread_mute.ex
@@
-4,11
+4,15
@@
defmodule Pleroma.ThreadMute do
use Ecto.Schema
defmodule Pleroma.ThreadMute do
use Ecto.Schema
- alias Pleroma.{Repo, User, ThreadMute}
+
+ alias Pleroma.Repo
+ alias Pleroma.ThreadMute
+ alias Pleroma.User
+
require Ecto.Query
schema "thread_mutes" do
require Ecto.Query
schema "thread_mutes" do
- belongs_to(:user, User, type:
Pleroma.FlakeId
)
+ belongs_to(:user, User, type:
FlakeId.Ecto.CompatType
)
field(:context, :string)
end
field(:context, :string)
end
@@
-20,7
+24,7
@@
defmodule Pleroma.ThreadMute do
end
def query(user_id, context) do
end
def query(user_id, context) do
-
user_id = Pleroma.FlakeId.from_string
(user_id)
+
{:ok, user_id} = FlakeId.Ecto.CompatType.dump
(user_id)
ThreadMute
|> Ecto.Query.where(user_id: ^user_id)
ThreadMute
|> Ecto.Query.where(user_id: ^user_id)