Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,6 @@ func formatBRNumber(jid string) string {
return jid
}

// Extract the first digit after DDD
if len(jid) < 6 {
return jid
}

firstDigit := jid[4:5]
firstDigitNum, err := strconv.Atoi(firstDigit)
if err != nil {
return jid
}

// Check if it's a mobile number (9 prefix) and DDD >= 31
if firstDigitNum >= 7 && dddNum >= 31 {
// Remove the 9 prefix for mobile numbers with DDD >= 31
return jid[:4] + jid[5:]
}

// Keep the number as is (landline or special case)
return jid
}
Expand Down