Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 900413: [Messages] Should detect and link 5 digit short codes in mes... #12490

Closed
wants to merge 1 commit into from

Conversation

KDDI-tech
Copy link

Bug 900413: [Messages] Should detect and link 5 digit short codes in message text. - r=gnarf

  • Updated minimum digits to be detected as a phone number to 5
  • Ensured that when 5 digits, the number is only 5 characters without removing separators

…message text. - r=gnarf

- Updated minimum digits to be detected as a phone number to 5
- Ensured that when 5 digits, the number is only 5 characters without removing separators
@KDDI-tech KDDI-tech closed this Sep 27, 2013
@KDDI-tech KDDI-tech reopened this Sep 27, 2013
@gnarf
Copy link
Contributor

gnarf commented Sep 27, 2013

You'll want to make sure you have your git author email linked up to your github - note that your commit isn't owned by @KDDI-tech - but this looks great! Ping me when you've fixed the linking :)

[
'0.34',
'1200',
'5000',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will prevent short codes from working Belgium, Chile, Denmark, Dominican Republic, Germany, Hungary, Indonesia, Morocco, Nepal, The Netherlands, Nigeria, Norway, New Zealand, Pakistan, Panama, Philippines, Russia, Serbia, Spain, Switzerland, Taiwan and Turkey. All of these countries use either 3 or 4 digits, or both.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our goal is not to support all short codes, since this would also turn 2013
into a link.

This compromise on short codes of 5 length sadly also turns us zip codes,
but if someone wants to dial 02145, I suppose we can let them
On Sep 27, 2013 11:21 AM, "Rick Waldron" notifications@github.com wrote:

In apps/sms/test/unit/link_helper_test.js:

 });

 suite('Failures', function() {
  •  ['0.34', '1200', '5000', '0.122', '0921'].forEach(function(phone) {
    
  •    test(phone, function() {
    
  •      testPhoneNOK(phone);
    
  •    });
    
  •  [
    
  •    '0.34',
    
  •    '1200',
    
  •    '5000',
    

This will prevent short codes from working Belgium, Chile, Denmark,
Dominican Republic, Germany, Hungary, Indonesia, Morocco, Nepal, The
Netherlands, Nigeria, Norway, New Zealand, Pakistan, Panama, Philippines,
Russie, Serbia, Spain, Switzerland, Taiwan and Turkey. All of these
countries use either 3 or 4 digits, or both.


Reply to this email directly or view it on GitHubhttps://github.com//pull/12490/files#r6630460
.

@gnarf gnarf closed this in 14911c4 Sep 27, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants