Fix issue where sms_body was not being handled as an alternative to Intent.EXTRA_TEXT when sending SMS messages. Updated the launchThreadActivity function in NewConversationActivity.kt to handle sms_body as a fallback for message text.

This commit is contained in:
Anis-cpu-13 2023-03-26 23:44:50 +02:00
parent fb0da99dc0
commit b4ea472884
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ class NewConversationActivity : SimpleActivity() {
private fun launchThreadActivity(phoneNumber: String, name: String) {
hideKeyboard()
val text = intent.getStringExtra(Intent.EXTRA_TEXT) ?: ""
val text = intent.getStringExtra(Intent.EXTRA_TEXT) ?: intent.getStringExtra("sms_body") ?: ""
val numbers = phoneNumber.split(";").toSet()
val number = if (numbers.size == 1) phoneNumber else Gson().toJson(numbers)
Intent(this, ThreadActivity::class.java).apply {