mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-05 09:46:49 +08:00
Merge branch 'v2.3.0release'
This commit is contained in:
commit
beb9a37649
@ -157,6 +157,8 @@ func ManagementSendMsg(c *gin.Context) {
|
||||
data = CustomElem{}
|
||||
case constant.CustomOnlineOnly:
|
||||
data = CustomElem{}
|
||||
case constant.AtText:
|
||||
data = AtElem{}
|
||||
//case constant.HasReadReceipt:
|
||||
//case constant.Typing:
|
||||
//case constant.Quote:
|
||||
|
@ -291,11 +291,11 @@ func (rpc *rpcChat) AddMessageReactionExtensions(ctx context.Context, req *msg.A
|
||||
if callbackResp.ActionCode != constant.ActionAllow || callbackResp.ErrCode != 0 {
|
||||
rResp.ErrCode = int32(callbackResp.ErrCode)
|
||||
rResp.ErrMsg = callbackResp.ErrMsg
|
||||
for _, value := range req.ReactionExtensionList {
|
||||
for _, value := range callbackResp.ResultReactionExtensionList {
|
||||
temp := new(msg.KeyValueResp)
|
||||
temp.KeyValue = value
|
||||
temp.ErrMsg = callbackResp.ErrMsg
|
||||
temp.ErrCode = 100
|
||||
temp.KeyValue = value.KeyValue
|
||||
temp.ErrMsg = value.ErrMsg
|
||||
temp.ErrCode = value.ErrCode
|
||||
rResp.Result = append(rResp.Result, temp)
|
||||
}
|
||||
return &rResp, nil
|
||||
|
@ -273,7 +273,7 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID st
|
||||
func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, error) {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
|
||||
regex := fmt.Sprintf("^%s", ID)
|
||||
regex := fmt.Sprintf("^%s:", ID)
|
||||
findOpts := options.Find().SetLimit(1).SetSkip(index).SetSort(bson.M{"uid": 1})
|
||||
var msgs []UserChat
|
||||
//primitive.Regex{Pattern: regex}
|
||||
@ -330,7 +330,7 @@ func (d *DataBases) ReplaceMsgToBlankByIndex(suffixID string, index int) (replac
|
||||
func (d *DataBases) GetNewestMsg(ID string) (msg *open_im_sdk.MsgData, err error) {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
|
||||
regex := fmt.Sprintf("^%s", ID)
|
||||
regex := fmt.Sprintf("^%s:", ID)
|
||||
findOpts := options.Find().SetLimit(1).SetSort(bson.M{"uid": -1})
|
||||
var userChats []UserChat
|
||||
cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": regex}}, findOpts)
|
||||
@ -358,7 +358,7 @@ func (d *DataBases) GetNewestMsg(ID string) (msg *open_im_sdk.MsgData, err error
|
||||
func (d *DataBases) GetOldestMsg(ID string) (msg *open_im_sdk.MsgData, err error) {
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
||||
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cChat)
|
||||
regex := fmt.Sprintf("^%s", ID)
|
||||
regex := fmt.Sprintf("^%s:", ID)
|
||||
findOpts := options.Find().SetLimit(1).SetSort(bson.M{"uid": 1})
|
||||
var userChats []UserChat
|
||||
cursor, err := c.Find(ctx, bson.M{"uid": bson.M{"$regex": regex}}, findOpts)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -266,9 +266,10 @@ message MsgData {
|
||||
bytes msgDataList = 21;
|
||||
string attachedInfo = 22;
|
||||
string ex = 23;
|
||||
bool isReact = 24;
|
||||
bool isExternalExtensions = 25;
|
||||
int64 msgFirstModifyTime = 26;
|
||||
|
||||
bool isReact = 40;
|
||||
bool isExternalExtensions = 41;
|
||||
int64 msgFirstModifyTime = 42;
|
||||
|
||||
}
|
||||
message OfflinePushInfo{
|
||||
|
Loading…
x
Reference in New Issue
Block a user