Skip to content

fix: pass participant numbers when relaunching new group thread#820

Open
mvanhorn wants to merge 1 commit into
FossifyOrg:mainfrom
mvanhorn:fix/41-group-message-thread-number
Open

fix: pass participant numbers when relaunching new group thread#820
mvanhorn wants to merge 1 commit into
FossifyOrg:mainfrom
mvanhorn:fix/41-group-message-thread-number

Conversation

@mvanhorn

Copy link
Copy Markdown

Summary

Creating a group message no longer dead-ends with "An unknown error occurred" on devices whose telephony provider can't resolve participants for a freshly created thread id (the MIUI/Xiaomi failure in the report). When the add-contacts flow relaunches ThreadActivity with the new group's thread id, the intent now also carries the participant numbers (putExtra(THREAD_NUMBER, Gson().toJson(numbers))), and the empty-participants fallback in setupThread builds one participant per number via the existing getPhoneNumbersFromIntent() helper instead of reading a single plain-string extra.

Why this matters

The reporter in #41 could not create any group message: the compose flow computed the new thread id, relaunched the thread screen with only THREAD_ID, MIUI's provider returned no participants for that id, and the fallback found no THREAD_NUMBER extra so it toasted the unknown-error message and closed the screen. The helper this fix routes through already parses both a plain number and a Gson JSON array, so single-recipient relaunches behave exactly as before; the toast-and-finish path still fires when no numbers are available at all.

Testing

Traced both relaunch paths: existing single-number intents take the same one-participant branch as before, and the new group path round-trips the numbers through the JSON array format getPhoneNumbersFromIntent() already supports (ThreadActivity.kt:1798). Added the CHANGELOG "Fixed" entry per repo convention.

Fixes #41

@mvanhorn mvanhorn requested a review from naveensingh as a code owner July 12, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Group messages error

1 participant