This commit is contained in:
wangchuxiao
2023-03-06 16:23:16 +08:00
parent 8143d589aa
commit 23c24308f7
7 changed files with 70 additions and 78 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
}