diff --git a/.github/code-language-detector.yml b/.github/code-language-detector.yml index 9a81236b8..32a8c1f54 100644 --- a/.github/code-language-detector.yml +++ b/.github/code-language-detector.yml @@ -1,3 +1,17 @@ +# Copyright © 2024 OpenIM. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + directory: ./ file_types: - .go diff --git a/.github/workflows/code-language-detector.yml b/.github/workflows/code-language-detector.yml index 22307576a..80ec94733 100644 --- a/.github/workflows/code-language-detector.yml +++ b/.github/workflows/code-language-detector.yml @@ -1,3 +1,17 @@ +# Copyright © 2024 OpenIM. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + name: Language Check Workflow Test on: [pull_request] diff --git a/internal/rpc/friend/black.go b/internal/rpc/friend/black.go index 4bb0d9f58..4e130360c 100644 --- a/internal/rpc/friend/black.go +++ b/internal/rpc/friend/black.go @@ -79,7 +79,7 @@ func (s *friendServer) AddBlack(ctx context.Context, req *pbfriend.AddBlackReq) CreateTime: time.Now(), Ex: req.Ex, } - + if err := s.blackDatabase.Create(ctx, []*relation.BlackModel{&black}); err != nil { return nil, err } diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index e1e0dfed7..92d9e27d6 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -637,7 +637,7 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbgroup.GetG return resp, nil } -// GetGroupApplicationList handles functions that get a list of group requests +// GetGroupApplicationList handles functions that get a list of group requests. func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbgroup.GetGroupApplicationListReq) (*pbgroup.GetGroupApplicationListResp, error) { groupIDs, err := s.db.FindUserManagedGroupID(ctx, req.FromUserID) if err != nil { diff --git a/pkg/common/db/mgo/group.go b/pkg/common/db/mgo/group.go index 01bb64cde..c63e3c376 100644 --- a/pkg/common/db/mgo/group.go +++ b/pkg/common/db/mgo/group.go @@ -19,8 +19,7 @@ import ( "time" "github.com/OpenIMSDK/protocol/constant" - - "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mgoutil" "github.com/OpenIMSDK/tools/pagination" "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"