diff options
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/broadcast.go')
-rw-r--r-- | vendor/go.mau.fi/whatsmeow/broadcast.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/broadcast.go b/vendor/go.mau.fi/whatsmeow/broadcast.go index c1260a9c..a61ccfb6 100644 --- a/vendor/go.mau.fi/whatsmeow/broadcast.go +++ b/vendor/go.mau.fi/whatsmeow/broadcast.go @@ -25,16 +25,20 @@ func (cli *Client) getBroadcastListParticipants(jid types.JID) ([]types.JID, err if err != nil { return nil, err } + ownID := cli.getOwnID().ToNonAD() + if ownID.IsEmpty() { + return nil, ErrNotLoggedIn + } var hasSelf bool for _, participant := range list { - if participant.User == cli.Store.ID.User { + if participant.User == ownID.User { hasSelf = true break } } if !hasSelf { - list = append(list, cli.Store.ID.ToNonAD()) + list = append(list, ownID) } return list, nil } |