michaelkourlas / voipms-sms-client

Popular Android messaging app for VoIP.ms, a Canadian VoIP provider
https://play.google.com/store/apps/details?id=net.kourlas.voipms_sms
Apache License 2.0
216 stars 51 forks source link

Prevent splitting URLs in messages over the character limit #245

Open Philippe-Choquette opened 1 year ago

Philippe-Choquette commented 1 year ago

When sending a message that is over the character limit, it will be split in multiple messages. If the splitting occurs in the middle of a URL, it will prevent the URL from being clickable on the receiving end.

A way to solve this would be to encapsulate the URLs into their own message.

Here's an example.

Source message

Have you seen the new iPhone? https://www.apple.com/iphone-13-pro/key-features/ It's quite expensive tho.

Current implementation

Message 1: Have you seen the new iPhone? https://www.apple.com/ipho

Message 2: ne-13-pro/key-features/ It's quite expensive tho.

Proposed result:

Message 1: Have you seen the new iPhone?

Message 2: https://www.apple.com/iphone-13-pro/key-features/

Message 3: It's quite expensive tho.

johnlescault commented 1 year ago

I would like to request to expand this to never cut words half way through. I assume it would be the same fix. Also, it seems like when messages get cut they are rarely sent in the correct order, would it be possible to create a small delay between each?