fix: remove unnecessary error handling to avoid sending nil resp. (#2010)

* fix: remove unnecessary error handling to avoid sending failed notifications.

* fix: remove unnecessary error handling to avoid sending nil resp.
pull/2012/head
OpenIM-Gordon 9 months ago committed by GitHub
parent 52ddc4f05b
commit 13d0883507
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -757,7 +757,7 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbgroup
return nil, errs.ErrGroupRequestHandled.Wrap("group request already processed")
}
var inGroup bool
if _, takeErr := s.db.TakeGroupMember(ctx, req.GroupID, req.FromUserID); takeErr == nil {
if _, err := s.db.TakeGroupMember(ctx, req.GroupID, req.FromUserID); err == nil {
inGroup = true // Already in group
} else if !s.IsNotFound(err) {
return nil, err

Loading…
Cancel
Save