]> Untitled Git - lemmy.git/commitdiff
Update activitystreams to 0.7.0-alpha.3 (from crates.io)
authorFelix Ableitner <me@nutomic.com>
Sat, 1 Aug 2020 13:25:17 +0000 (15:25 +0200)
committerFelix Ableitner <me@nutomic.com>
Sat, 1 Aug 2020 13:25:17 +0000 (15:25 +0200)
24 files changed:
server/Cargo.lock
server/Cargo.toml
server/src/apub/activities.rs
server/src/apub/comment.rs
server/src/apub/community.rs
server/src/apub/extensions/group_extensions.rs
server/src/apub/extensions/page_extension.rs
server/src/apub/extensions/signatures.rs
server/src/apub/fetcher.rs
server/src/apub/inbox/activities/announce.rs
server/src/apub/inbox/activities/create.rs
server/src/apub/inbox/activities/delete.rs
server/src/apub/inbox/activities/dislike.rs
server/src/apub/inbox/activities/like.rs
server/src/apub/inbox/activities/remove.rs
server/src/apub/inbox/activities/undo.rs
server/src/apub/inbox/activities/update.rs
server/src/apub/inbox/community_inbox.rs
server/src/apub/inbox/shared_inbox.rs
server/src/apub/inbox/user_inbox.rs
server/src/apub/mod.rs
server/src/apub/post.rs
server/src/apub/private_message.rs
server/src/apub/user.rs

index 3f19827be26a764016c49a9bad10d64f3aea5faa..90687982a29b70d5e6c62659f989aa9069d42d70 100644 (file)
@@ -1,26 +1,28 @@
 # This file is automatically @generated by Cargo.
 # It is not intended for manual editing.
 [[package]]
-name = "activitystreams-ext"
-version = "0.1.0"
-source = "git+https://yerbamate.dev/asonix/activitystreams-ext?branch=main#2799a4c606467a2f577e1f45f93c6828ec83cfdf"
+name = "activitystreams"
+version = "0.7.0-alpha.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3490e8e9d7744aada19fb2fb4e2564f8c22fd080a3561093ac91ed7d10bfe78"
 dependencies = [
- "activitystreams-new",
+ "chrono",
+ "mime",
  "serde 1.0.114",
  "serde_json",
+ "thiserror",
+ "url",
 ]
 
 [[package]]
-name = "activitystreams-new"
-version = "0.1.0"
-source = "git+https://yerbamate.dev/asonix/activitystreams-new?branch=main#857d5167dfa13054dd0d21d3d54f8147eea0d546"
+name = "activitystreams-ext"
+version = "0.1.0-alpha.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb8e19a0810cc25df3535061a08b7d8f8a734d309ea4411c57a9767e4a2ffa0e"
 dependencies = [
- "chrono",
- "mime",
+ "activitystreams",
  "serde 1.0.114",
  "serde_json",
- "thiserror",
- "url",
 ]
 
 [[package]]
@@ -1726,8 +1728,8 @@ dependencies = [
 name = "lemmy_server"
 version = "0.0.1"
 dependencies = [
+ "activitystreams",
  "activitystreams-ext",
- "activitystreams-new",
  "actix",
  "actix-files",
  "actix-rt",
index 3a652f2985d46c88f51bece32e23bb7eb8bc5260..d245cf4d4147e20ddf1606fa6bf7603b3ec390ce 100644 (file)
@@ -18,8 +18,8 @@ lemmy_db = { path = "./lemmy_db" }
 diesel = "1.4.4"
 diesel_migrations = "1.4.0"
 dotenv = "0.15.0"
-activitystreams-new = { git = "https://yerbamate.dev/asonix/activitystreams-new", branch = "main" }
-activitystreams-ext = { git = "https://yerbamate.dev/asonix/activitystreams-ext", branch = "main" }
+activitystreams = "0.7.0-alpha.3"
+activitystreams-ext = "0.1.0-alpha.2"
 bcrypt = "0.8.0"
 chrono = { version = "0.4.7", features = ["serde"] }
 serde_json = { version = "1.0.52", features = ["preserve_order"]}
index a622c691d4ede2982ab9e1656dd162075fe16ab0..9fdfe37fb57c7925fdc15ac0eeff33439e4c8a1a 100644 (file)
@@ -10,7 +10,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::base::AnyBase;
+use activitystreams::base::AnyBase;
 use actix_web::client::Client;
 use lemmy_db::{community::Community, user::User_};
 use lemmy_utils::{get_apub_protocol_string, settings::Settings};
index 650c60577e404ca11efa727f838524d08d4ebb4f..05b40dbe5d242d7f16ee8411cb6bb5fb0c0b8b98 100644 (file)
@@ -21,7 +21,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{
+use activitystreams::{
   activity::{
     kind::{CreateType, DeleteType, DislikeType, LikeType, RemoveType, UndoType, UpdateType},
     Create,
index 584ef310c06c6ed9a6ee4192469e17d6a174119e..96f0f84c3a4100f388b47fa7ee58bca9633b2052 100644 (file)
@@ -18,8 +18,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_ext::Ext2;
-use activitystreams_new::{
+use activitystreams::{
   activity::{
     kind::{AcceptType, AnnounceType, DeleteType, LikeType, RemoveType, UndoType},
     Accept,
@@ -37,6 +36,7 @@ use activitystreams_new::{
   prelude::*,
   public,
 };
+use activitystreams_ext::Ext2;
 use actix_web::{body::Body, client::Client, web, HttpResponse};
 use itertools::Itertools;
 use lemmy_db::{
@@ -403,7 +403,7 @@ pub async fn get_apub_community_followers(
   })
   .await??;
 
-  let mut collection = UnorderedCollection::new(vec![]);
+  let mut collection = UnorderedCollection::new();
   collection
     .set_context(context())
     // TODO: this needs its own ID
@@ -433,8 +433,9 @@ pub async fn get_apub_community_outbox(
   }
 
   let len = pages.len();
-  let mut collection = OrderedCollection::new(pages);
+  let mut collection = OrderedCollection::new();
   collection
+    .set_many_items(pages)
     .set_context(context())
     .set_id(community.get_outbox_url()?)
     .set_total_items(len as u64);
index 7dc42c4a0d1850dd22e8a4048f8ae7d039d498c2..3099a273eaca63aeaecd71f35fb1877d8ff6577b 100644 (file)
@@ -1,6 +1,6 @@
 use crate::LemmyError;
+use activitystreams::unparsed::UnparsedMutExt;
 use activitystreams_ext::UnparsedExtension;
-use activitystreams_new::unparsed::UnparsedMutExt;
 use diesel::PgConnection;
 use lemmy_db::{category::Category, Crud};
 use serde::{Deserialize, Serialize};
index 3b0b89b5ad56133a7345bb158787fb44f637f633..aa3d01604dd2592609e6d479746ef6d306c02f0f 100644 (file)
@@ -1,5 +1,5 @@
+use activitystreams::unparsed::UnparsedMutExt;
 use activitystreams_ext::UnparsedExtension;
-use activitystreams_new::unparsed::UnparsedMutExt;
 use serde::{Deserialize, Serialize};
 
 #[derive(Clone, Debug, Default, Deserialize, Serialize)]
index 5a1cdeb82e7588cd1faafc52df8257f531839a51..e37bde25090579d0f34c63cde225fe37ce0dc35d 100644 (file)
@@ -1,6 +1,6 @@
 use crate::{apub::ActorType, LemmyError};
+use activitystreams::unparsed::UnparsedMutExt;
 use activitystreams_ext::UnparsedExtension;
-use activitystreams_new::unparsed::UnparsedMutExt;
 use actix_web::{client::ClientRequest, HttpRequest};
 use http_signature_normalization_actix::{
   digest::{DigestClient, SignExt},
index e2d505df7ac891bca3c39363474b33e0dd751c5f..51f3a50b410ed3c49d49650c840149591408d26a 100644 (file)
@@ -15,7 +15,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{base::BaseExt, collection::OrderedCollection, object::Note, prelude::*};
+use activitystreams::{base::BaseExt, collection::OrderedCollection, object::Note, prelude::*};
 use actix_web::client::Client;
 use chrono::NaiveDateTime;
 use diesel::{result::Error::NotFound, PgConnection};
@@ -348,7 +348,7 @@ async fn fetch_remote_community(
   // fetch outbox (maybe make this conditional)
   let outbox =
     fetch_remote_object::<OrderedCollection>(client, &community.get_outbox_url()?).await?;
-  let outbox_items = outbox.items().clone();
+  let outbox_items = outbox.items().unwrap().clone();
   for o in outbox_items.many().unwrap() {
     let page = PageExt::from_any_base(o)?.unwrap();
     let post = PostForm::from_apub(&page, client, pool).await?;
index 78a005fb17618a97e1cb0a5b05c70421a1f70696..8ca4856feffc4695134ca684f312e9d67d526668 100644 (file)
@@ -15,7 +15,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{activity::*, base::AnyBase, prelude::ExtendsExt};
+use activitystreams::{activity::*, base::AnyBase, prelude::ExtendsExt};
 use actix_web::{client::Client, HttpResponse};
 
 pub async fn receive_announce(
index 0f5595cd01d9504c7b83908d98ed85994a3ec859..f8a92c1c688ad3ae7c9279f021ed44c1eeb10c55 100644 (file)
@@ -21,7 +21,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{activity::Create, base::AnyBase, object::Note, prelude::*};
+use activitystreams::{activity::Create, base::AnyBase, object::Note, prelude::*};
 use actix_web::{client::Client, HttpResponse};
 use lemmy_db::{
   comment::{Comment, CommentForm},
index b4fe0de4867fe3ae0d8236b5d83375be8988f60f..4fb56d321eadcf1414a9109b5723d9c2c6055a27 100644 (file)
@@ -20,7 +20,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{activity::Delete, base::AnyBase, object::Note, prelude::*};
+use activitystreams::{activity::Delete, base::AnyBase, object::Note, prelude::*};
 use actix_web::{client::Client, HttpResponse};
 use lemmy_db::{
   comment::{Comment, CommentForm},
index cb12724d6d7b6cc7f2fbb21ac584d5aa90bbb32a..1e67d192231cf0cf0619fabdfaf524b494bcf01a 100644 (file)
@@ -19,7 +19,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{activity::Dislike, base::AnyBase, object::Note, prelude::*};
+use activitystreams::{activity::Dislike, base::AnyBase, object::Note, prelude::*};
 use actix_web::{client::Client, HttpResponse};
 use lemmy_db::{
   comment::{CommentForm, CommentLike, CommentLikeForm},
index da92bbff33bfb0ec571623cafdafc5f48cef2894..9061773d0cc60db678884b74ee5c3eaf24f90403 100644 (file)
@@ -19,7 +19,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{activity::Like, base::AnyBase, object::Note, prelude::*};
+use activitystreams::{activity::Like, base::AnyBase, object::Note, prelude::*};
 use actix_web::{client::Client, HttpResponse};
 use lemmy_db::{
   comment::{CommentForm, CommentLike, CommentLikeForm},
index af3d144b8adf6f98b28d8c680a926c5e58868ab0..485d28616bad352c961285b2962d6288261c76ed 100644 (file)
@@ -20,7 +20,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{activity::Remove, base::AnyBase, object::Note, prelude::*};
+use activitystreams::{activity::Remove, base::AnyBase, object::Note, prelude::*};
 use actix_web::{client::Client, HttpResponse};
 use lemmy_db::{
   comment::{Comment, CommentForm},
index 332364843ce0ca30635c614e4b3f0d4f9025e201..6c90fc814e73d33f2615bb56c0b1dcaff788ebed 100644 (file)
@@ -20,7 +20,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{activity::*, base::AnyBase, object::Note, prelude::*};
+use activitystreams::{activity::*, base::AnyBase, object::Note, prelude::*};
 use actix_web::{client::Client, HttpResponse};
 use lemmy_db::{
   comment::{Comment, CommentForm, CommentLike, CommentLikeForm},
index 5da262e1fdbac3b4147c31a9f9a04b2a8b85b0cb..9af1a2d38c75e18e9b02c3c3ae0561aec5def439 100644 (file)
@@ -22,7 +22,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{activity::Update, base::AnyBase, object::Note, prelude::*};
+use activitystreams::{activity::Update, base::AnyBase, object::Note, prelude::*};
 use actix_web::{client::Client, HttpResponse};
 use lemmy_db::{
   comment::{Comment, CommentForm},
index 8088ec5c356cd51d419a9d8434a78a53068d8afa..337a89900e75d7305821c591b9963b3b45764788 100644 (file)
@@ -9,7 +9,7 @@ use crate::{
   routes::{ChatServerParam, DbPoolParam},
   LemmyError,
 };
-use activitystreams_new::{
+use activitystreams::{
   activity::{Follow, Undo},
   prelude::*,
 };
index 3a2d1c43fbdc55e32edad775dcbb93aa0c467020..9e0cdb3d84a37c677fb1d1c7e0d688bc1fbd00d3 100644 (file)
@@ -23,7 +23,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{
+use activitystreams::{
   activity::{ActorAndObject, ActorAndObjectRef},
   base::{AsBase, Extends},
   object::AsObject,
index be99d81a0b286ae1fc8525482e3c8764cd3434c1..b46f670276ea0ee4f1c1df3c613aa618a464a8c4 100644 (file)
@@ -12,7 +12,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{
+use activitystreams::{
   activity::{Accept, Create, Delete, Undo, Update},
   object::Note,
   prelude::*,
index feb1f30fc1d05f16e432d2582b0be21b71f80f30..0af19dcd80ef978e36603a127a1f0e00732631a3 100644 (file)
@@ -20,13 +20,13 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_ext::{Ext1, Ext2};
-use activitystreams_new::{
+use activitystreams::{
   activity::Follow,
   actor::{ApActor, Group, Person},
   object::{Page, Tombstone},
   prelude::*,
 };
+use activitystreams_ext::{Ext1, Ext2};
 use actix_web::{body::Body, client::Client, HttpResponse};
 use chrono::NaiveDateTime;
 use failure::_core::fmt::Debug;
index 39e4faf3412e602851de0b9208ac9b9392a90a77..4b687b0ae1e615b9b8bf29fa1c095959cff86da1 100644 (file)
@@ -18,8 +18,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_ext::Ext1;
-use activitystreams_new::{
+use activitystreams::{
   activity::{
     kind::{CreateType, DeleteType, DislikeType, LikeType, RemoveType, UndoType, UpdateType},
     Create,
@@ -35,6 +34,7 @@ use activitystreams_new::{
   prelude::*,
   public,
 };
+use activitystreams_ext::Ext1;
 use actix_web::{body::Body, client::Client, web, HttpResponse};
 use lemmy_db::{
   community::Community,
index f58a6bfed46cafaf0cf708decceb9175521011f1..69f552d3b4343f853a0a1aa613d10471e71995f9 100644 (file)
@@ -12,7 +12,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_new::{
+use activitystreams::{
   activity::{
     kind::{CreateType, DeleteType, UndoType, UpdateType},
     Create,
index 4632086039d8d302fa6a1e48c9de45a0ef853663..54e4552fddd5f81f397000b25d79c2a24b8e728f 100644 (file)
@@ -13,8 +13,7 @@ use crate::{
   DbPool,
   LemmyError,
 };
-use activitystreams_ext::Ext1;
-use activitystreams_new::{
+use activitystreams::{
   activity::{
     kind::{FollowType, UndoType},
     Follow,
@@ -25,6 +24,7 @@ use activitystreams_new::{
   object::{Image, Tombstone},
   prelude::*,
 };
+use activitystreams_ext::Ext1;
 use actix_web::{body::Body, client::Client, web, HttpResponse};
 use lemmy_db::{
   naive_now,