Merge remote-tracking branch 'origin/errcode' into errcode

This commit is contained in:
withchao
2023-03-06 17:43:48 +08:00
27 changed files with 279 additions and 173 deletions
@@ -1,6 +1,7 @@
package unrelation
import (
"OpenIM/pkg/proto/sdkws"
"context"
"strconv"
"strings"
@@ -66,3 +67,15 @@ func (e *ExtendMsgSetModel) SplitSourceIDAndGetIndex() int32 {
type GetAllExtendMsgSetOpts struct {
ExcludeExtendMsgs bool
}
func (ExtendMsgSetModel) Pb2Model(reactionExtensionList map[string]*sdkws.KeyValue) map[string]*KeyValueModel {
r := make(map[string]*KeyValueModel)
for key, value := range reactionExtensionList {
r[key] = &KeyValueModel{
TypeKey: value.TypeKey,
Value: value.Value,
LatestUpdateTime: value.LatestUpdateTime,
}
}
return r
}