sent message only visible after reopen #45

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

handle_send in archipelago.rs fired the send RPC and dropped the resulting ChatMessage on the floor. The message only appeared once the user navigated away and back, triggering a fresh fetch_messages call.

Fix: after a successful send, convert the returned ChatMessage to a MessageData and push it into active_messages (optimistic update). Also guard against double-insert when a concurrent refetch races with the send response.

`handle_send` in `archipelago.rs` fired the send RPC and dropped the resulting `ChatMessage` on the floor. The message only appeared once the user navigated away and back, triggering a fresh `fetch_messages` call. **Fix**: after a successful send, convert the returned `ChatMessage` to a `MessageData` and push it into `active_messages` (optimistic update). Also guard against double-insert when a concurrent refetch races with the send response.
zaelgohary changed title from bug: sent message only appears after reopening the chat to sent message only visible after reopen 2026-04-19 08:32:19 +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#45
No description provided.