empty user_key renders all messages as "Me" #51

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

chatmessage_to_messagedata computes is_own = msg.sender_public_key == own_user_key. When own_user_key is empty (archipelago reads props.context.user.public_key.clone().unwrap_or_default(), which yields "" if the context never provided one), every message with an empty sender_public_key matches → the whole thread renders right-aligned with sender 'Me'.

Fix: treat empty key as 'no identity' and short-circuit to is_own = false.

`chatmessage_to_messagedata` computes `is_own = msg.sender_public_key == own_user_key`. When `own_user_key` is empty (archipelago reads `props.context.user.public_key.clone().unwrap_or_default()`, which yields `""` if the context never provided one), every message with an empty `sender_public_key` matches → the whole thread renders right-aligned with sender `'Me'`. **Fix**: treat empty key as 'no identity' and short-circuit to `is_own = false`.
zaelgohary changed title from bug: empty own_user_key makes every message render as 'Me' to empty user_key renders all messages as "Me" 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#51
No description provided.