fix bug: args error

This commit is contained in:
wangchuxiao
2023-07-13 11:03:22 +08:00
parent de1b970046
commit 4d89d7c618
4 changed files with 10 additions and 10 deletions
+3
View File
@@ -27,6 +27,9 @@ func BlackDB2Pb(
blackDBs []*relation.BlackModel,
f func(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error),
) (blackPbs []*sdk.BlackInfo, err error) {
if len(blackDBs) == 0 {
return nil, nil
}
var userIDs []string
for _, blackDB := range blackDBs {
userIDs = append(userIDs, blackDB.BlockUserID)