# It is not intended for manual editing.
version = 3
-[[package]]
-name = "activitystreams"
-version = "0.7.0-alpha.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bcc3fbb392890a1942b1e5cca76cba93c8ed24b5ff50004cc3289afaab3f92c"
-dependencies = [
- "activitystreams-kinds",
- "chrono",
- "mime",
- "serde",
- "serde_json",
- "thiserror",
- "url",
-]
-
[[package]]
name = "activitystreams-kinds"
version = "0.1.2"
name = "lemmy_apub_lib"
version = "0.15.1"
dependencies = [
- "activitystreams",
"actix-web",
"anyhow",
"async-trait",
"background-jobs",
"base64 0.13.0",
+ "chrono",
"diesel",
"http",
"http-signature-normalization-actix",
name = "lemmy_server"
version = "0.15.1"
dependencies = [
- "activitystreams",
"actix",
"actix-rt",
"actix-web",
reqwest = { version = "0.11.7", features = ["json"] }
reqwest-middleware = "0.1.3"
reqwest-tracing = { version = "0.2.0", features = ["opentelemetry_0_16"] }
-activitystreams = "0.7.0-alpha.14"
actix-rt = { version = "2.5.0", default-features = false }
serde_json = { version = "1.0.72", features = ["preserve_order"] }
clokwerk = "0.3.5"
[dependencies]
lemmy_utils = { version = "=0.15.1", path = "../utils" }
lemmy_apub_lib_derive = { version = "=0.15.1", path = "../apub_lib_derive" }
-activitystreams = "0.7.0-alpha.14"
+chrono = "0.4.19"
serde = { version = "1.0.131", features = ["derive"] }
async-trait = "0.1.52"
url = { version = "2.2.2", features = ["serde"] }
use crate::{traits::ApubObject, APUB_JSON_CONTENT_TYPE};
-use activitystreams::chrono::{Duration as ChronoDuration, NaiveDateTime, Utc};
use anyhow::anyhow;
+use chrono::{Duration as ChronoDuration, NaiveDateTime, Utc};
use diesel::NotFound;
use lemmy_utils::{request::retry, settings::structs::Settings, LemmyError};
use reqwest::StatusCode;
use crate::{data::Data, signatures::PublicKey};
-use activitystreams::chrono::NaiveDateTime;
+use chrono::NaiveDateTime;
pub use lemmy_apub_lib_derive::*;
use lemmy_utils::LemmyError;
use url::Url;
-use activitystreams::error::DomainError;
use lemmy_utils::LemmyError;
use url::Url;
+#[derive(Debug)]
+struct DomainError;
+
+impl std::fmt::Display for DomainError {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "Domain mismatch")
+ }
+}
+
+impl std::error::Error for DomainError {}
+
pub fn verify_domains_match(a: &Url, b: &Url) -> Result<(), LemmyError> {
if a.domain() != b.domain() {
return Err(DomainError.into());