Use LEGACY fetch mode for better compat
This commit is contained in:
parent
21b47409f1
commit
f0d7d793ca
3 changed files with 7 additions and 7 deletions
|
@ -48,7 +48,7 @@ impl Client {
|
|||
.body(())
|
||||
.unwrap();
|
||||
|
||||
key.sign(Options::MODERN, &req)
|
||||
key.sign(Options::LEGACY, &req)
|
||||
.map_err(FetchError::Sig)?
|
||||
.commit(&mut req);
|
||||
|
||||
|
@ -82,7 +82,7 @@ impl Client {
|
|||
.unwrap();
|
||||
|
||||
println!("[{system}]: using modern config");
|
||||
key.sign(Options::MODERN, &req)
|
||||
key.sign(Options::LEGACY, &req)
|
||||
.expect("signing error")
|
||||
.commit(&mut req);
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ where
|
|||
],
|
||||
"id": self.id.to_string(),
|
||||
"actor": self.actor.to_string(),
|
||||
"object": self.object.to_json_ld(),
|
||||
"type": self.kind.to_string(),
|
||||
"object": self.object.to_json_ld()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ impl Actor {
|
|||
pub enum Object {
|
||||
Activity(Activity),
|
||||
Actor(Actor),
|
||||
Object {
|
||||
Other {
|
||||
id: String,
|
||||
kind: String,
|
||||
content: Option<String>,
|
||||
|
@ -82,14 +82,14 @@ impl Object {
|
|||
match self {
|
||||
Object::Activity(a) => &a.id,
|
||||
Object::Actor(a) => &a.id,
|
||||
Object::Object { id, .. } => id,
|
||||
Object::Other { id, .. } => id,
|
||||
}
|
||||
}
|
||||
pub fn to_json_ld(&self) -> Value {
|
||||
match self {
|
||||
Object::Activity(a) => a.to_json_ld(),
|
||||
Object::Actor(a) => a.to_json_ld(),
|
||||
Object::Object { id, kind, content, summary } => json!({
|
||||
Object::Other { id, kind, content, summary } => json!({
|
||||
"id": id.to_string(),
|
||||
"type": kind,
|
||||
"content": content,
|
||||
|
|
|
@ -76,7 +76,7 @@ pub fn get_local_ap_object(tx: &Transaction<'_>, key: Key) -> Result<fetch::obje
|
|||
let Some(Content { content, warning, .. }) = tx.get_mixin(key)? else {
|
||||
panic!()
|
||||
};
|
||||
Ok(fetch::object::Object::Object {
|
||||
Ok(fetch::object::Object::Other {
|
||||
id: obj.id.0.clone().into(),
|
||||
summary: warning,
|
||||
content,
|
||||
|
|
Loading…
Reference in a new issue