projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma]
/
lib
/
pleroma
/
conversation
/
participation.ex
diff --git
a/lib/pleroma/conversation/participation.ex
b/lib/pleroma/conversation/participation.ex
index ab81f32173fd1a69694eed8aa39c1be0013843bc..e17f49e58da622ec8db706bc2dfad9ca0a2a8f5b 100644
(file)
--- a/
lib/pleroma/conversation/participation.ex
+++ b/
lib/pleroma/conversation/participation.ex
@@
-48,6
+48,12
@@
defmodule Pleroma.Conversation.Participation do
|> validate_required([:read])
end
|> validate_required([:read])
end
+ def mark_as_read(%User{} = user, %Conversation{} = conversation) do
+ with %__MODULE__{} = participation <- for_user_and_conversation(user, conversation) do
+ mark_as_read(participation)
+ end
+ end
+
def mark_as_read(participation) do
participation
|> read_cng(%{read: true})
def mark_as_read(participation) do
participation
|> read_cng(%{read: true})