tangled
alpha
login
or
join now
nonbinary.computer
/
jacquard
80
fork
atom
A better Rust ATProto crate
80
fork
atom
overview
issues
9
pulls
pipelines
small fix for cid link in json if inferred
Orual
5 months ago
31f3fb7b
37d093d5
0/0
Waiting for spindle ...
+6
-2
1 changed file
expand all
collapse all
unified
split
crates
jacquard-common
src
types
value.rs
+6
-2
crates/jacquard-common/src/types/value.rs
···
131
131
}
132
132
}
133
133
DataModelType::CidLink => {
134
134
-
if let Some(value) = value.as_str() {
135
135
-
map.insert(key.to_smolstr(), Data::CidLink(Cid::Str(value.into())));
134
134
+
if let Some(value) = value.as_object() {
135
135
+
if let Some(value) = value.get("$link").and_then(|v| v.as_str()) {
136
136
+
map.insert(key.to_smolstr(), Data::CidLink(Cid::Str(value.into())));
137
137
+
} else {
138
138
+
map.insert(key.to_smolstr(), Object::from_json(value));
139
139
+
}
136
140
} else {
137
141
map.insert(key.to_smolstr(), Data::from_json(value));
138
142
}