messages: created_at never stamped on save #25

Closed
opened 2026-04-19 08:25:32 +00:00 by zaelgohary · 0 comments
Member

The server-side chatmessage_trigger_save_pre trigger in crates/hero_osis_server/src/communication/server/rpc.rs was a no-op, so every saved message kept created_at = 0 / updated_at = 0.

This surfaced in the messaging UI as 00:00 times on every message bubble and an Invalid Date / Jan 1 1970 entry in the conversation list when the server data was first loaded.

Expected: every persisted ChatMessage has a non-zero creation time the first time it is stored, and updated_at refreshes on every subsequent save.

Proposed fix: stamp created_at (when 0) and updated_at in the central chatmessage_trigger_save_pre trigger — one hook covers send_message, reply_to_message, add_reaction, and any future handler.

The server-side `chatmessage_trigger_save_pre` trigger in `crates/hero_osis_server/src/communication/server/rpc.rs` was a no-op, so every saved message kept `created_at = 0` / `updated_at = 0`. This surfaced in the messaging UI as `00:00` times on every message bubble and an `Invalid Date` / `Jan 1 1970` entry in the conversation list when the server data was first loaded. **Expected**: every persisted `ChatMessage` has a non-zero creation time the first time it is stored, and `updated_at` refreshes on every subsequent save. **Proposed fix**: stamp `created_at` (when 0) and `updated_at` in the central `chatmessage_trigger_save_pre` trigger — one hook covers `send_message`, `reply_to_message`, `add_reaction`, and any future handler.
zaelgohary changed title from bug: ChatMessage.created_at / updated_at never stamped on save to messages: created_at never stamped on save 2026-04-19 08:32:18 +00:00
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_osis#25
No description provided.