mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-01 07:35:58 +08:00
ws connID
This commit is contained in:
@@ -25,7 +25,7 @@ type ExtendMsgSet struct {
|
||||
}
|
||||
|
||||
type ReactionExtendMsgSet struct {
|
||||
TypeKey string `bson:"type_key" json:"typeKey"`
|
||||
UserKey string `bson:"user_key" json:"userKey"`
|
||||
Value string `bson:"value" json:"value"`
|
||||
}
|
||||
|
||||
@@ -82,13 +82,20 @@ func (d *DataBases) InsertExtendMsg(ID string, index int32, msg *ExtendMsg) (msg
|
||||
return set.ExtendMsgNum, err
|
||||
}
|
||||
|
||||
func (d *DataBases) UpdateOneExtendMsgSet(ID string, index, MsgIndex int32, msg *ExtendMsg, msgSet *ExtendMsgSet) error {
|
||||
func (d *DataBases) UpdateOneExtendMsgSet(ID string, index, MsgIndex int32, userIndex string, value string) error {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cExtendMsgSet)
|
||||
_, err := c.UpdateOne(ctx, bson.M{"uid": GetExtendMsgSetID(ID, index)}, bson.M{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (d *DataBases) DelOneExtendMsgSetUserKey(ID string, index, MsgIndex int32, userIndex string, userID string) error {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cExtendMsgSet)
|
||||
_, err := c.DeleteOne(ctx, bson.M{"uid": GetExtendMsgSetID(ID, index)})
|
||||
return err
|
||||
}
|
||||
|
||||
func (d *DataBases) GetExtendMsgList(ID string, index, msgStartIndex, msgEndIndex int32) (extendMsgList []*ExtendMsg, err error) {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cExtendMsgSet)
|
||||
|
||||
Reference in New Issue
Block a user