RocketChat / Rocket.Chat.Cordova

Rocket.Chat Cross-Platform Mobile Application via Cordova (DEPRECATED)
MIT License
104 stars 109 forks source link

Add intent/app links #131

Closed jparyani closed 7 years ago

jparyani commented 7 years ago

@RocketChat/core

This adds supports for offering users a link that when clicked will open the Rocket.Chat mobile app and add the appropriate server. This is especially useful under Sandstorm, where the link is long/complicated. It uses cordova-plugin-customurlscheme to do the bulk of the work, and only requires a small amount of custom javascript code defined in a global handleOpenURL function.

This is also fixes a bug with xhrs under Sandstorm (it's now monkey-patched similarly to how WebSockets were).

@engelgabriel Can I get your opinion on using clientapp-rocketchat as the scheme? Beginning the scheme with clientapp- is required under Sandstorm, since this will be a user controlled field and we wanted to block potentially malicuous schemes such as script