ChatController: Add mark_as_read
This commit is contained in:
parent
30590cf46b
commit
b04328c3de
5 changed files with 62 additions and 1 deletions
|
|
@ -60,4 +60,10 @@ defmodule Pleroma.Chat do
|
|||
conflict_target: [:user_id, :recipient]
|
||||
)
|
||||
end
|
||||
|
||||
def mark_as_read(chat) do
|
||||
chat
|
||||
|> change(%{unread: 0})
|
||||
|> Repo.update()
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue