Mark chat mention notifications as read when viewing the message

This commit is contained in:
Max Brunsfeld 2023-10-21 16:18:27 +01:00
parent e32aa95092
commit fce09e8c92
7 changed files with 73 additions and 9 deletions

View file

@ -3061,11 +3061,16 @@ async fn acknowledge_channel_message(
) -> Result<()> {
let channel_id = ChannelId::from_proto(request.channel_id);
let message_id = MessageId::from_proto(request.message_id);
session
let notifications = session
.db()
.await
.observe_channel_message(channel_id, session.user_id, message_id)
.await?;
send_notifications(
&*session.connection_pool().await,
&session.peer,
notifications,
);
Ok(())
}