Skip to content

Commit

Permalink
add a nilcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
cnuss committed Jan 15, 2024
1 parent 6f5c2bd commit 00d7f88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions imessage/bluebubbles/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ func (bb *blueBubbles) GetChatInfo(chatID, threadID string) (*imessage.ChatInfo,
return nil, err
}

if chatResponse.Data == nil {
return nil, errors.New("chat is missing data payload")
}

if chatResponse.Data.GroupId != threadID {
return nil, errors.New("threadID does not match")
}
Expand Down

0 comments on commit 00d7f88

Please sign in to comment.