vinaygopinath / launch-chat

Chat with WhatsApp, Signal and Telegram users without saving phone numbers or sharing your contacts with the app
https://f-droid.org/en/packages/org.vinaygopinath.launchchat/
GNU General Public License v3.0
132 stars 8 forks source link

Handle SMS links #15

Closed vinaygopinath closed 7 months ago

vinaygopinath commented 8 months ago

Problem

Users are unable to use Launch Chat with sms links

Context

Websites can add links that initiate an SMS conversation with sms:<some-phone-number>?body=<some-message-content> (or smsto:, mms: or mmsto:)

Solution

Add the ability to handle SMS/MMS links

Requirements

  1. Register Launch Chat as an option to handle SMS/MMS links (the app should show up as an option when "sms:" links are clicked.
  2. Upon launch, parse the link to extract the phone number and optional message body. Additional attachment data (part of the MMS URI spec) will be ignored.
  3. Auto-fill the message input field if the link has a message body.

Out of scope

Although the SMS URI specifies that multiple phone numbers can be specified in the link, its usage seems extremely limited compared to the prevalent "one phone number + maybe a message body" pattern. To avoid increasing the scope, this implementation will ignore the multiple phone numbers handling until such a link is encountered in the wild by users.

Reference