Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't auto-link 10 digit numbers #810

Closed
dbussert opened this issue Sep 15, 2015 · 14 comments · Fixed by #2808
Closed

Don't auto-link 10 digit numbers #810

dbussert opened this issue Sep 15, 2015 · 14 comments · Fixed by #2808

Comments

@dbussert
Copy link

any 10 digit number typed in will be auto-linked as a telephone number. Chat should not assume a 10 digit number (with no hyphens even) is a telephone number. We post calculations and lat/lon, and it will pull out even part of a number and link it.

image

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@marceloschmidt
Copy link
Member

We use https://www.npmjs.com/package/autolinker and it does have an option for not parsing phone numbers. I just wonder if that should be the default behavior, an admin settings or a user settings. @RocketChat/owners what's your take on this?

@marceloschmidt
Copy link
Member

@geekgonecrazy
Copy link
Contributor

:) I'd think it'd be user specific. Cause it seems like that'd kinda be a personal preference

@engelgabriel
Copy link
Member

Should be an admin settings for the default behavior and overwrittable by an user settings

@geekgonecrazy
Copy link
Contributor

👍 I like that.

@rwakida
Copy link
Contributor

rwakida commented Sep 16, 2015

Too much configuration settings is overwhelming.

I think if the user wants to enter a phone number, they should either format it themselves or use a specific syntax that the autolinker understands to convert to a phone number. Like in GitHub how we type : +1: to specify 👍

Also, if we auto format, then there has to be a way to specify the format. Or would we guess based on their locale?

@dbussert
Copy link
Author

If the syntax specific for phone numbers was better, it would solve this specific issue. For a US number, it should only match 123-456-6789, not any 10 digits. I don't know how that library handles international numbers, but I believe everyone uses 1 or more dashes somewhere.

@mitar
Copy link
Contributor

mitar commented Sep 17, 2015

Those configuration settings is just for admins though. I think this is OK. Slack also has a lot of settings, but somehow it is good.

Why would parsing numbers be useful at all? Where do they point to?

@engelgabriel
Copy link
Member

They would create the call... so if you have a softphone.. you can just click and it will dial. Skype can also dial phone number on web pages.

@mitar
Copy link
Contributor

mitar commented Sep 17, 2015

So I see it reasonable that this would be enabled by default for phone apps, but on desktop is probably strange default?

@gmsecrieru
Copy link
Contributor

Update: Looks like this is affecting 8+ digits:

digits

@LeonardOliveros
Copy link

No results with disabling phone: false in the package / rocketchat-autolinker / autolinker.coffee still affecting more than 8 digits

@LeonardOliveros
Copy link

captura de pantalla de 2015-10-05 16 13 39
No results :(

@richardwlu
Copy link

👍 Has there been any workaround or resolution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants