This commit is contained in:
withchao
2023-02-16 17:08:24 +08:00
parent fe2cf94d36
commit 20ba4e33e8
10 changed files with 122 additions and 100 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package controller
import (
relation2 "Open_IM/pkg/common/db/relation"
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/utils"
"context"
"errors"
"gorm.io/gorm"
@@ -100,7 +101,7 @@ func (b *BlackDatabase) CheckIn(ctx context.Context, userID1, userID2 string) (i
inUser2Blacks = true
_, err = b.sqlDB.Take(ctx, userID2, userID1)
if err != nil {
if errors.Unwrap(err) != gorm.ErrRecordNotFound {
if utils.Unwrap(err) != gorm.ErrRecordNotFound {
return
}
inUser2Blacks = false