Skip to content

Commit

Permalink
ignore disabled SMS contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
keepalivedev committed Nov 28, 2023
1 parent 5b2d2ff commit f448224
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/main/java/io/keepalive/android/AlertFunctions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ fun sendAlertMessages(context: Context, locationStr: String) {
// iterate through the contacts and send 1 or 2 SMS messages to each
for (contact in smsContacts) {

// if the contact is disabled then skip it
if (!contact.isEnabled) {
continue
}

Log.d(
"sendAlertMessage", "Alert message is ${contact.alertMessage}, " +
"SMS contact number is ${contact.phoneNumber}"
Expand Down

0 comments on commit f448224

Please sign in to comment.