pull/1508/head
withchao 2 years ago
parent 3be274be28
commit 84bc7f3293

@ -15,12 +15,11 @@
package msg package msg
import ( import (
"github.com/redis/go-redis/v9"
"gorm.io/gorm"
"github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/protocol/sdkws" "github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/utils" "github.com/OpenIMSDK/tools/utils"
"github.com/redis/go-redis/v9"
"go.mongodb.org/mongo-driver/mongo"
"github.com/openimsdk/open-im-server/v3/pkg/common/config" "github.com/openimsdk/open-im-server/v3/pkg/common/config"
) )
@ -45,7 +44,7 @@ func isMessageHasReadEnabled(msgData *sdkws.MsgData) bool {
func IsNotFound(err error) bool { func IsNotFound(err error) bool {
switch utils.Unwrap(err) { switch utils.Unwrap(err) {
case redis.Nil, gorm.ErrRecordNotFound: case redis.Nil, mongo.ErrNoDocuments:
return true return true
default: default:
return false return false

Loading…
Cancel
Save