Replace Pleroma.FlakeId with flake_id hex package

This commit is contained in:
Egor Kislitsyn 2019-09-18 21:54:31 +07:00
commit b5dfe83433
25 changed files with 35 additions and 262 deletions

View file

@ -12,7 +12,7 @@ defmodule Pleroma.ThreadMute 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
@ -24,7 +24,7 @@ defmodule Pleroma.ThreadMute 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)