mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-24 08:34:12 +00:00
Expand 'age' comment
This commit is contained in:
1 parent
1abf5e7561
commit
7124eeb339
1 file changed
+3
-1
@@ -448,7 +448,9 @@ fn serialize_event_value(
|
||||
// We might not have an `age_ts`, e.g. if a remote server did not include
|
||||
// the `age` field in the event it sent us. Since `age_ts` is generated by
|
||||
// us, it *should* be an integer, but it is possible for it to be out of i64
|
||||
// range. In that case, just omit `age` rather than erroring.
|
||||
// range (e.g. if the original `age` was close to the maximum i64 value). In
|
||||
// that case, just omit `age` rather than erroring (otherwise a once valid
|
||||
// event could start failing).
|
||||
let unsigned = unsigned_mut(&mut d)?;
|
||||
if let Some(age_ts) = event.unsigned().age_ts()?.and_then(|n| n.as_i64()) {
|
||||
unsigned.insert(
|
||||
|
||||
Reference in new issue
Block a user