diff --git a/internal/api/msg.go b/internal/api/msg.go index 9d7cfc2a7..92938a93a 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -131,6 +131,10 @@ func (m *Message) MarkMsgsAsRead(c *gin.Context) { a2r.Call(msg.MsgClient.MarkMsgsAsRead, m.client, c) } +func (m *Message) MarkConversationAsRead(c *gin.Context) { + a2r.Call(msg.MsgClient.MarkConversationAsRead, m.client, c) +} + func (m *Message) GetConversationsHasReadAndMaxSeq(c *gin.Context) { a2r.Call(msg.MsgClient.GetConversationsHasReadAndMaxSeq, m.client, c) } diff --git a/internal/api/route.go b/internal/api/route.go index 38af49c6a..191fd03da 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -141,6 +141,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive msgGroup.POST("/pull_msg_by_seq", m.PullMsgBySeqs) msgGroup.POST("/revoke_msg", m.RevokeMsg) msgGroup.POST("/mark_msgs_as_read", m.MarkMsgsAsRead) + msgGroup.POST("/mark_conversation_as_read", m.MarkConversationAsRead) msgGroup.POST("/get_conversations_has_read_and_max_seq", m.GetConversationsHasReadAndMaxSeq) msgGroup.POST("/clear_conversation_msg", m.ClearConversationsMsg)