This commit is contained in:
wangchuxiao
2023-05-04 16:00:06 +08:00
parent 334e1b77b6
commit 9c76988225
11 changed files with 407 additions and 402 deletions
+6 -5
View File
@@ -4,10 +4,11 @@ import (
"context"
"errors"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"strconv"
"time"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
@@ -212,12 +213,12 @@ func (c *notificationCache) DeleteTokenByUidPid(ctx context.Context, userID stri
return errs.Wrap(c.rdb.HDel(ctx, key, fields...).Err())
}
func (c *notificationCache) getMessageCacheKey(sourceID string, seq int64) string {
return NotificationMessageCache + sourceID + "_" + strconv.Itoa(int(seq))
func (c *notificationCache) getMessageCacheKey(conversationID string, seq int64) string {
return NotificationMessageCache + conversationID + "_" + strconv.Itoa(int(seq))
}
func (c *notificationCache) allMessageCacheKey(sourceID string) string {
return NotificationMessageCache + sourceID + "_*"
func (c *notificationCache) allMessageCacheKey(conversationID string) string {
return NotificationMessageCache + conversationID + "_*"
}
func (c *notificationCache) GetMessagesBySeq(ctx context.Context, userID string, seqs []int64) (seqMsgs []*sdkws.MsgData, failedSeqs []int64, err error) {