mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 13:05:58 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
# Conflicts: # cmd/api/main.go # internal/api/a2r/api2rpc.go # internal/apiresp/resp.go # internal/msgtransfer/online_history_msg_handler.go # internal/push/consumer_init.go # pkg/common/db/controller/conversation.go # pkg/common/mw/gin.go # pkg/statistics/statistics.go
This commit is contained in:
@@ -32,7 +32,7 @@ type ConversationDatabase interface {
|
||||
SetUsersConversationFiledTx(ctx context.Context, userIDList []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error
|
||||
}
|
||||
|
||||
func NewConversationDatabase(conversation relation.Conversation, cache cache.ConversationCache, tx tx.Tx) ConversationDatabase {
|
||||
func NewConversationDatabase(conversation relationTb.ConversationModelInterface, cache cache.ConversationCache, tx tx.Tx) ConversationDatabase {
|
||||
return &ConversationDataBase{
|
||||
conversationDB: conversation,
|
||||
cache: cache,
|
||||
@@ -41,7 +41,7 @@ func NewConversationDatabase(conversation relation.Conversation, cache cache.Con
|
||||
}
|
||||
|
||||
type ConversationDataBase struct {
|
||||
conversationDB relation.Conversation
|
||||
conversationDB relationTb.ConversationModelInterface
|
||||
cache cache.ConversationCache
|
||||
tx tx.Tx
|
||||
}
|
||||
|
||||
@@ -46,9 +46,8 @@ func (u *userDatabase) InitOnce(ctx context.Context, users []*relation.UserModel
|
||||
}
|
||||
miss := utils.SliceAnySub(users, result, func(e *relation.UserModel) string { return e.UserID })
|
||||
if len(miss) > 0 {
|
||||
u.userDB.Create(ctx, miss)
|
||||
_ = u.userDB.Create(ctx, miss)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user