Threema actions are missing in contact details because Threema's raw contacts have no name
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start with the named ContactsHelper.kt, ViewContactActivity.kt, and Context-contacts.kt references to trace how raw contacts are loaded and how social actions are found. The report says the reporter has already prepared and tested an implementation; coordinate with them before starting. Done means nameless Threema raw contacts appear as contact sources and offer the existing message and call actions.
Written by the indexing model from the issue text.
Description
Checklist
- I can reproduce the bug with the latest version given here.
- I made sure that there are no existing issues - open or closed - to which I could contribute my information.
- I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
- I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
- I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- This issue contains only one bug.
- I have read and understood the contribution guidelines.
Affected app version
1.6.0
Affected Android/Custom ROM version
GrapheneOS 2026102101 (Android 17)
Affected device model
Pixel 9 Pro XL
How did you install the app?
F-Droid / IzzyOnDroid
Steps to reproduce the bug
- Install Threema Libre 6.5.3l (build 1216), enable contact synchronization in Threema and grant it access to contacts.
- Make sure a contact in the address book has a phone number or email address that belongs to a Threema user. Threema then links its own raw contact to that contact.
- Open this contact in Fossify Contacts (with the "Contact source" field visible).
- Optionally open the filter dialog in the contact list.
Expected behavior
The contact sources list a Threema entry with the Threema icon, and tapping it offers "Message" / "Call", like it already works for WhatsApp. The stock contacts app on the same device shows these Threema actions for the same contact.
Actual behavior
There is no Threema entry and no way to reach the Threema actions from the contact details. In the filter dialog, the Threema source is listed and enabled, but with (0) contacts. WhatsApp entries on the same device are shown correctly.
Already ruled out: Threema contact sync is on, Fossify Contacts has full contacts permission, account sync is active, "Show only contacts with phone numbers" is off.
Screenshots/Screen recordings
Additional information
Root cause
Threema creates one raw contact per linked contact in its own account. That raw contact only has two data rows (vnd.ch.threema.app.profile and vnd.ch.threema.app.call) and is joined to the existing contact with AggregationExceptions.TYPE_KEEP_TOGETHER. The code for a StructuredName row is present but commented out:
https://github.com/threema-ch/threema-android/blob/d44a2b53b2ea2c0bf1065bdaa96987570e5b4e6d/app/src/main/java/ch/threema/app/utils/AndroidContactUtil.java#L157-L219
Fossify only loads raw contacts that have a StructuredName or Organization row, so Threema's raw contacts are never loaded:
https://github.com/FossifyOrg/Commons/blob/675cd53384c9d1c09a8f7308dacb81757599ef50/commons/src/main/kotlin/org/fossify/commons/helpers/ContactsHelper.kt#L141
As a result the filter shows (0), the Threema raw contact never becomes one of the contact's sources, and the existing Threema branch in setupContactSources() is never reached:
https://github.com/FossifyOrg/Contacts/blob/59e96245420f5ed1f6bad5e50c244b0fecd0a36f/app/src/main/kotlin/org/fossify/contacts/activities/ViewContactActivity.kt#L667-L673
Fossify already knows Threema's mimetypes in getSocialActions(), which looks up data rows by raw contact id and does not need a name row:
https://github.com/FossifyOrg/Commons/blob/675cd53384c9d1c09a8f7308dacb81757599ef50/commons/src/main/kotlin/org/fossify/commons/extensions/Context-contacts.kt#L281-L330
WhatsApp is not affected because it writes a name and phone number into its raw contact. The stock contacts app reads all data rows of the aggregated contact, whether a name row exists or not.
I use Threema Libre. It creates its account with the name "Threema Libre" and type ch.threema.app.libre, but uses the same mimetypes as regular Threema, so a fix based on mimetypes covers both. The existing branch in setupContactSources() checks the account name for "threema" and would not match Threema Libre even if its raw contacts were loaded.
Proposed fix
- Commons: add a lookup for raw contacts aggregated into a contact (
Data.CONTACT_ID) that carry a known messenger mimetype but neither a name nor an organization row. - Contacts: in
ViewContactActivity, list those raw contacts as additional contact sources with the messenger icon; tapping them opens the existing social actions dialog.
This keeps contact loading untouched, so no empty entries show up in the contact list. It is not specific to Threema; it covers any supported messenger that links nameless raw contacts. The "(0)" count in the filter dialog stays as it is, since those raw contacts are still not loaded as contacts of their own.
Note on opening the chat
With the fix applied, the dialog offers "Message to <Threema ID>" and "Call …" as expected (the label text comes from Threema's DATA3). On my Pixel, tapping "Message" currently opens an empty Threema screen. The stock GrapheneOS contacts app shows exactly the same behavior for the same contact, so this is not caused by Fossify. On a Samsung Galaxy S20 FE, the same action from the stock contacts app opens the chat normally. I will look into this on the Threema side separately.
Related: in https://github.com/orgs/FossifyOrg/discussions/770 the connected apps (Signal, Threema, WhatsApp) were requested, and the answer was that Fossify Contacts already shows them as contact sources with the app icon. That works for WhatsApp, but not for Threema, for the reason above. #230 is about alternative Telegram/Signal clients that use their own account types, which is a different cause: Threema Libre uses the standard Threema mimetypes, the problem here is the missing name row.
I have prepared an implementation (about 70 lines in Commons, 50 in Contacts) and tested it on my device (see the screenshots above). I would like to submit the PRs if this gets the "help wanted" label.
- Dominant language
- Kotlin
- Stars
- 917
- Forks
- 73
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FossifyOrg/Contacts
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
FossifyOrg/Contacts#632 ·
Maintainers usually reply within 1 day
-
feature request needs triage
Difficulty 1/5 Under an hour Newbie friendliness 72/100
FossifyOrg/Contacts#176 · 1 comment ·
Maintainers usually reply within 1 day
-
Account picker for new contacts offers DAVx⁵'s main account; contacts saved there are never syncedOpenbug needs triage
Difficulty 3/5 1-2 days Newbie friendliness 55/100
FossifyOrg/Contacts#654 ·
Maintainers usually reply within 1 day
-
bug needs triage
Difficulty 4/5 3-5 days Newbie friendliness 25/100
FossifyOrg/Contacts#649 · 2 reactions ·
Maintainers usually reply within 1 day
-
bug needs triage
Difficulty 4/5 3-5 days Newbie friendliness 45/100
FossifyOrg/Contacts#642 ·
Maintainers usually reply within 1 day
All issues in FossifyOrg/Contacts
Similar issues
-
bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
grote/Transportr#1029 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
TeamAmaze/AmazeFileManager#4800 ·
Maintainers usually reply within 1 day
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
FossifyOrg/Gallery#1235 ·
Maintainers usually reply within 1 day
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsotto/sotto-authenticator#139 ·
Maintainers usually reply within 1 day
-
enhancement module:webview p3
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
NucleusFramework/Nucleus#1004 ·
Maintainers usually reply within 1 day