# It is not intended for manual editing.
[[package]]
name = "activitystreams"
-version = "0.5.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae98a55a86fc3150f278b225644cd46b5359f4d75067eae6dc3a52b409c537fb"
+checksum = "dd5b29a0f2c64cc56f2b79ec29cab68a9dab3b714d811a55668d072f18a8638e"
dependencies = [
"activitystreams-derive",
"chrono",
[[package]]
name = "activitystreams-derive"
-version = "0.5.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20d0384ae423a1df266f216e351ce9b40e8d369467d9242c086121154b4327dd"
+checksum = "985d3ca1ee226e83f4118e0235bc11d9fce39c4eec8d53739a21b01dd0b3f30f"
dependencies = [
"proc-macro2",
"quote",
diesel = { version = "1.4.4", features = ["postgres","chrono","r2d2","64-column-tables","serde_json"] }
diesel_migrations = "1.4.0"
dotenv = "0.15.0"
-activitystreams = "0.5.0-alpha.16"
+activitystreams = "0.6.0"
bcrypt = "0.6.2"
chrono = { version = "0.4.7", features = ["serde"] }
failure = "0.1.5"
use fetcher::{get_or_fetch_and_upsert_remote_community, get_or_fetch_and_upsert_remote_user};
use signatures::verify;
use signatures::{sign, PublicKey, PublicKeyExtension};
-use activitystreams::primitives::XsdString;
type GroupExt = Ext<Ext<Group, ApActorProperties>, PublicKeyExtension>;
type PersonExt = Ext<Ext<Person, ApActorProperties>, PublicKeyExtension>;
tombstone
.object_props
.set_id(object_id)?
- .set_published(convert_datetime(published));
+ .set_published(convert_datetime(published))?;
if let Some(updated) = updated {
tombstone
.object_props
.set_updated(convert_datetime(updated))?;
}
- tombstone.tombstone_props.set_former_type_object_box(XsdString::from_string(former_type))?;
+ tombstone.tombstone_props.set_former_type_xsd_string(former_type)?;
Ok(tombstone)
} else {
Err(format_err!(
.to_owned()
.unwrap()
.to_owned()
- .to_concrete::<Page>()?;
+ .into_concrete::<Page>()?;
let user_uri = create
.create_props
.to_owned()
.unwrap()
.to_owned()
- .to_concrete::<Note>()?;
+ .into_concrete::<Note>()?;
let user_uri = create
.create_props
.to_owned()
.unwrap()
.to_owned()
- .to_concrete::<Page>()?;
+ .into_concrete::<Page>()?;
let user_uri = update
.update_props
.to_owned()
.unwrap()
.to_owned()
- .to_concrete::<Page>()?;
+ .into_concrete::<Page>()?;
let user_uri = like.like_props.get_actor_xsd_any_uri().unwrap().to_string();
.to_owned()
.unwrap()
.to_owned()
- .to_concrete::<Page>()?;
+ .into_concrete::<Page>()?;
let user_uri = dislike
.dislike_props
.to_owned()
.unwrap()
.to_owned()
- .to_concrete::<Note>()?;
+ .into_concrete::<Note>()?;
let user_uri = update
.update_props
.to_owned()
.unwrap()
.to_owned()
- .to_concrete::<Note>()?;
+ .into_concrete::<Note>()?;
let user_uri = like.like_props.get_actor_xsd_any_uri().unwrap().to_string();
.to_owned()
.unwrap()
.to_owned()
- .to_concrete::<Note>()?;
+ .into_concrete::<Note>()?;
let user_uri = dislike
.dislike_props
.to_owned()
.unwrap()
.to_owned()
- .to_concrete::<Tombstone>()?;
- // TODO: not sure how to handle formerType (should be a string)
- // https://www.w3.org/TR/activitystreams-vocabulary/#dfn-formertype
- let former_type: &str = tombstone.tombstone_props.get_former_type_object_box().unwrap().to_concrete::<String>();
- match former_type {
+ .into_concrete::<Tombstone>()?;
+ let former_type = tombstone.tombstone_props.get_former_type_xsd_string().unwrap().to_string();
+ // TODO: handle these
+ match former_type.as_str() {
"Group" => {},
d => return Err(format_err!("Delete type {} not supported", d)),
}