DM shows raw public key instead of contact name #54

Closed
opened 2026-04-19 08:25:35 +00:00 by zaelgohary · 1 comment
Member

Server-side DMs are created with conversation.name = format!("DM with {}", participant_public_key). The messaging archipelago rendered that stored string literally in both the chat list and the chat detail header, so the UI showed raw keys like 'DM with fulltest123key456' where the contact's friendly name was expected.

Fix: add participant_keys: Vec<String> to ChatPreviewData; expose a pure resolve_chat_display_name(raw_name, is_group, participant_keys, own_user_key, contacts) helper in the service layer; load contacts unconditionally on archipelago mount; resolve the non-self participant's contact name at render time and in the chat detail fetch. Groups keep the stored name unchanged; unknown participants fall back to the raw name.

Server-side DMs are created with `conversation.name = format!("DM with {}", participant_public_key)`. The messaging archipelago rendered that stored string literally in both the chat list and the chat detail header, so the UI showed raw keys like `'DM with fulltest123key456'` where the contact's friendly name was expected. **Fix**: add `participant_keys: Vec<String>` to `ChatPreviewData`; expose a pure `resolve_chat_display_name(raw_name, is_group, participant_keys, own_user_key, contacts)` helper in the service layer; load contacts unconditionally on archipelago mount; resolve the non-self participant's contact name at render time and in the chat detail fetch. Groups keep the stored name unchanged; unknown participants fall back to the raw name.
zaelgohary changed title from bug: DM name shows 'DM with <public_key>' instead of the contact's name to DM shows raw public key instead of contact name 2026-04-19 08:32:20 +00:00
Author
Member

Fixed by #56.

Fixed by https://forge.ourworld.tf/lhumina_code/hero_archipelagos/pulls/56.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_archipelagos#54
No description provided.