Skip to content

Commit

Permalink
fix: failed to send to single member
Browse files Browse the repository at this point in the history
  • Loading branch information
sunls24 committed Aug 14, 2024
1 parent 2ae1a3d commit 958985f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,13 +693,13 @@ func (s *Self) ForwardMessageToGroups(msg *SentMessage, delay time.Duration, gro
type SendMessageFunc func() (*SentMessage, error)

func (s *Self) sendMessageToMember(sendMessageFunc SendMessageFunc, delay time.Duration, members ...*User) error {
if len(members) == 0 {
return nil
}
msg, err := sendMessageFunc()
if err != nil {
return err
}
if len(members) == 0 {
return nil
}
return s.forwardMessage(msg, delay, members...)
}

Expand Down

0 comments on commit 958985f

Please sign in to comment.