(message: &serde_json::Map<String, Value>)
| 297 | } |
| 298 | |
| 299 | fn message_timestamp(message: &serde_json::Map<String, Value>) -> Option<crate::TimestampMs> { |
| 300 | timestamp_value(message.get("timestamp")) |
| 301 | .or_else(|| timestamp_value(message.get("createdAt"))) |
| 302 | .or_else(|| { |
| 303 | object_field(message, "metadata") |
| 304 | .and_then(|metadata| timestamp_value(metadata.get("timestamp"))) |
| 305 | }) |
| 306 | } |
| 307 | |
| 308 | fn parse_codebuff_chat_id_timestamp(chat_id: &str) -> Option<crate::TimestampMs> { |
| 309 | let (date, time) = chat_id.split_once('T')?; |
no test coverage detected