|
|
@@ -402,7 +402,7 @@ func (g *Group) AddMembers(ctx context.Context, userIds []int64) ([]int64, []int |
|
|
|
return existIds, addedIds, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (g *Group) PushAddMember(ctx context.Context, optUserId int64, addedIds []int64) error { |
|
|
|
func (g *Group) PushAddMember(ctx context.Context, optUserId int64, addedIds []int64, isFilterGroupLeader bool) error { |
|
|
|
var addIdMap = make(map[int64]int32, len(addedIds)) |
|
|
|
for i := range addedIds { |
|
|
|
addIdMap[addedIds[i]] = 0 |
|
|
@@ -415,6 +415,9 @@ func (g *Group) PushAddMember(ctx context.Context, optUserId int64, addedIds []i |
|
|
|
} |
|
|
|
var members []*pb.GroupMember |
|
|
|
for k, _ := range addIdMap { |
|
|
|
if isFilterGroupLeader && k == optUserId { |
|
|
|
continue |
|
|
|
} |
|
|
|
member, ok := usersResp.Users[k] |
|
|
|
if !ok { |
|
|
|
continue |
|
|
|