mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
grpc
This commit is contained in:
parent
44b622af37
commit
8278528aeb
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,7 +5,7 @@ components
|
||||
out-test
|
||||
.github
|
||||
.idea
|
||||
|
||||
.exe
|
||||
|
||||
deploy/open_im_api
|
||||
deploy/open_im_msg_gateway
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
func NewUser(discov discoveryregistry.SvcDiscoveryRegistry) *User {
|
||||
conn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImUserName)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
// panic(err)
|
||||
}
|
||||
log.ZInfo(context.Background(), "user rpc conn", "conn", conn)
|
||||
return &User{conn: conn, discov: discov}
|
||||
@ -34,7 +34,7 @@ type User struct {
|
||||
func (u *User) client(ctx context.Context) (user.UserClient, error) {
|
||||
conn, err := u.discov.GetConn(ctx, config.Config.RpcRegisterName.OpenImUserName)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
return nil, err
|
||||
}
|
||||
return user.NewUserClient(conn), nil
|
||||
}
|
||||
|
@ -408,7 +408,13 @@ func (db *commonMsgDatabase) getMsgBySeqs(ctx context.Context, userID, conversat
|
||||
// }
|
||||
|
||||
func (db *commonMsgDatabase) findMsgInfoBySeq(ctx context.Context, userID, docID string, seqs []int64) (totalMsgs []*unRelationTb.MsgInfoModel, err error) {
|
||||
return db.msgDocDatabase.GetMsgBySeqIndexIn1Doc(ctx, userID, docID, seqs)
|
||||
msgs, err := db.msgDocDatabase.GetMsgBySeqIndexIn1Doc(ctx, userID, docID, seqs)
|
||||
for _, msg := range msgs {
|
||||
if msg.IsRead {
|
||||
msg.Msg.IsRead = true
|
||||
}
|
||||
}
|
||||
return msgs, err
|
||||
}
|
||||
|
||||
func (db *commonMsgDatabase) getMsgBySeqsRange(ctx context.Context, userID string, conversationID string, allSeqs []int64, begin, end int64) (seqMsgs []*sdkws.MsgData, err error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user