fix: pass participant numbers when relaunching new group thread#820
Open
mvanhorn wants to merge 1 commit into
Open
fix: pass participant numbers when relaunching new group thread#820mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ThreadActivitywith 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 insetupThreadbuilds one participant per number via the existinggetPhoneNumbersFromIntent()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 noTHREAD_NUMBERextra 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