gkucmierz / social-links

Validate & sanitize social links
https://npmjs.com/package/social-links
MIT License
28 stars 14 forks source link

Added support for x (Twitter) #56

Open bhavberi opened 4 months ago

bhavberi commented 4 months ago

Twitter was renamed to X, along with the change in its base domain/URL, and thus, it's necessary to support the new domain - x.com- and keep Twitter.com for backward compatibility.

ezebrotsky commented 2 months ago

This change is adding support for X, but removing it for Twitter. Those domains are still valid and redirect you to X, so I would keep them.

bhavberi commented 2 months ago

This change is adding support for X, but removing it for Twitter. Those domains are still valid and redirect you to X, so I would keep them.

No, I think you can still enter the twitter URL, but it builds a x.com profile URL output of it, which is better to prevent further redirects from twitter.com (As we don't know how long that URL will be active, and keeping the URLs upto date)