Threema actions are missing in contact details because Threema's raw contacts have no name
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 38/100
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Kotlin
- 星號
- 917
- 分支
- 73
- 平均合併
- 2 天 8 小時
- 30 天內合併 PR
- 7
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
FossifyOrg/Contacts 的其他 Issue
-
bug needs triage
難度 2/5 1-3 小時 新手友好度 78/100
FossifyOrg/Contacts#632 ·
維護者通常 1 天內回覆
-
feature request needs triage
難度 1/5 1 小時以內 新手友好度 72/100
FossifyOrg/Contacts#176 · 1 則留言 ·
維護者通常 1 天內回覆
-
Account picker for new contacts offers DAVx⁵'s main account; contacts saved there are never synced未關閉bug needs triage
難度 3/5 1-2 天 新手友好度 55/100
FossifyOrg/Contacts#654 ·
維護者通常 1 天內回覆
-
bug needs triage
難度 4/5 3-5 天 新手友好度 25/100
FossifyOrg/Contacts#649 · 2 個 reaction ·
維護者通常 1 天內回覆
-
bug needs triage
難度 4/5 3-5 天 新手友好度 45/100
FossifyOrg/Contacts#642 ·
維護者通常 1 天內回覆
查看 FossifyOrg/Contacts 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 65/100
thtbee/nectarlink#912 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
維護者通常 1 天內回覆
-
bug 🐞
難度 2/5 1-3 小時 新手友好度 70/100
grote/Transportr#1029 ·
-
難度 2/5 1-3 小時 新手友好度 79/100
TeamAmaze/AmazeFileManager#4800 ·
維護者通常 1 天內回覆
-
bug needs triage
難度 2/5 1-3 小時 新手友好度 82/100
FossifyOrg/Gallery#1235 ·
維護者通常 1 天內回覆