Revert "Merge branch 'user-info-unread-direct-conversation' into 'develop'"
This reverts merge request !1737
This commit is contained in:
parent
9c47d8571c
commit
e07e9cb75e
11 changed files with 14 additions and 211 deletions
|
|
@ -52,15 +52,6 @@ defmodule Pleroma.Conversation.Participation do
|
|||
participation
|
||||
|> read_cng(%{read: true})
|
||||
|> Repo.update()
|
||||
|> case do
|
||||
{:ok, participation} ->
|
||||
participation = Repo.preload(participation, :user)
|
||||
User.set_unread_conversation_count(participation.user)
|
||||
{:ok, participation}
|
||||
|
||||
error ->
|
||||
error
|
||||
end
|
||||
end
|
||||
|
||||
def mark_as_unread(participation) do
|
||||
|
|
@ -144,12 +135,4 @@ defmodule Pleroma.Conversation.Participation do
|
|||
|
||||
{:ok, Repo.preload(participation, :recipients, force: true)}
|
||||
end
|
||||
|
||||
def unread_conversation_count_for_user(user) do
|
||||
from(p in __MODULE__,
|
||||
where: p.user_id == ^user.id,
|
||||
where: not p.read,
|
||||
select: %{count: count(p.id)}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue