Matthias Nott
2026-03-21 fa34201bc07e5312ff0c6825933cd02ce7900254
lib/models/message.dart
....@@ -114,7 +114,7 @@
114114 };
115115 }
116116
117
- /// Lightweight JSON for persistence (strips heavy binary fields).
117
+ /// Lightweight JSON for persistence (strips temp audio paths, keeps images).
118118 Map<String, dynamic> toJsonLight() {
119119 return {
120120 'id': id,
....@@ -124,6 +124,9 @@
124124 'timestamp': timestamp,
125125 if (status != null) 'status': status!.name,
126126 if (duration != null) 'duration': duration,
127
+ // Keep imageBase64 — images are typically 50-200 KB and must survive restart.
128
+ // audioUri is intentionally omitted: it is a temp file path that won't survive restart.
129
+ if (imageBase64 != null) 'imageBase64': imageBase64,
127130 };
128131 }
129132