mark as read

This commit is contained in:
wangchuxiao 2023-06-02 16:38:15 +08:00
parent 0058cda6ee
commit b262103e48
5 changed files with 506 additions and 301 deletions

View File

@ -124,6 +124,10 @@ func (m *Message) RevokeMsg(c *gin.Context) {
a2r.Call(msg.MsgClient.RevokeMsg, m.client, c)
}
func (m *Message) MarkMsgsAsRead(c *gin.Context) {
a2r.Call(msg.MsgClient.MarkMsgsAsRead, m.client, c)
}
func (m *Message) ClearConversationsMsg(c *gin.Context) {
a2r.Call(msg.MsgClient.ClearConversationsMsg, m.client, c)
}

View File

@ -140,6 +140,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive
msgGroup.POST("/send_msg", m.SendMessage)
msgGroup.POST("/pull_msg_by_seq", m.PullMsgBySeqs)
msgGroup.POST("/revoke_msg", m.RevokeMsg)
msgGroup.POST("/mark_msgs_as_read", m.MarkMsgsAsRead)
msgGroup.POST("/clear_conversation_msg", m.ClearConversationsMsg)
msgGroup.POST("/user_clear_all_msg", m.UserClearAllMsg)

View File

@ -0,0 +1,11 @@
package msg
import (
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg"
)
func (m *msgServer) MarkMsgsAsRead(ctx context.Context, req *msg.MarkMsgsAsReadReq) (resp *msg.MarkMsgsAsReadResp, err error) {
return
}

File diff suppressed because it is too large Load Diff

View File

@ -167,6 +167,15 @@ message RevokeMsgReq {
message RevokeMsgResp {
}
message MarkMsgsAsReadReq {
string conversationID = 1;
repeated int64 seqs = 2;
string userID = 3;
}
message MarkMsgsAsReadResp {
}
message DeleteSyncOpt {
bool IsSyncSelf = 3;
bool IsSyncOther = 4;
@ -249,6 +258,7 @@ service msg {
//
rpc GetSendMsgStatus(GetSendMsgStatusReq) returns(GetSendMsgStatusResp);
rpc RevokeMsg(RevokeMsgReq) returns(RevokeMsgResp);
rpc MarkMsgsAsRead(MarkMsgsAsReadReq) returns(MarkMsgsAsReadResp);
//
rpc SetMessageReactionExtensions(SetMessageReactionExtensionsReq) returns(SetMessageReactionExtensionsResp);
rpc GetMessagesReactionExtensions(GetMessagesReactionExtensionsReq) returns(GetMessagesReactionExtensionsResp);