mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-01 03:46:44 +01:00
fix warning
This commit is contained in:
parent
cf28d6e915
commit
3e4cad2c7d
1 changed files with 3 additions and 1 deletions
|
@ -105,8 +105,8 @@ defmodule Philomena.Conversations do
|
|||
|> Repo.aggregate(:count, :id)
|
||||
end
|
||||
|
||||
|
||||
def mark_conversation_read(conversation, user, read \\ true)
|
||||
def mark_conversation_hidden(conversation, user, hidden \\ true)
|
||||
|
||||
def mark_conversation_read(%Conversation{to_id: user_id} = conversation, %{id: user_id}, read) do
|
||||
conversation
|
||||
|
@ -121,6 +121,8 @@ defmodule Philomena.Conversations do
|
|||
def mark_conversation_read(_conversation, _user, _read), do: {:ok, nil}
|
||||
|
||||
|
||||
def mark_conversation_hidden(conversation, user, hidden \\ true)
|
||||
|
||||
def mark_conversation_hidden(%Conversation{to_id: user_id} = conversation, %{id: user_id}, hidden) do
|
||||
conversation
|
||||
|> Conversation.hidden_changeset(%{to_hidden: hidden})
|
||||
|
|
Loading…
Reference in a new issue