Fix upload 500 (missing EmbRecordState) and empty chats tab (Timestamp cast)

FixMediaService
Shipped
May 1, 2026 at 9:18 AM UTC
Author
Kamo
Commit
4026521

Defect A: ChatAttachmentService.upload omitted **************** causing a NOT NULL violation on imgs.is_active. Added the default recordState. Also hardened ChatAttachmentController to catch all exceptions and return a JSON error body with the real message instead of a generic Servlet 500 HTML response. Defect B: MediaController.getChatSessions cast query results directly to LocalDateTime but CockroachDB's JDBC driver returns java.sql.Timestamp. Added toLocalDateTime() helper that handles Timestamp, Date, and plain LocalDateTime so the cast never throws.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing