Fix user following (#2623)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
This commit is contained in:
Nutomic 2022-12-19 15:55:26 +00:00 committed by GitHub
parent c3fbb7702f
commit 9f52d4ae53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -52,6 +52,7 @@ pub enum GroupInboxActivities {
#[serde(untagged)] #[serde(untagged)]
#[enum_delegate::implement(ActivityHandler)] #[enum_delegate::implement(ActivityHandler)]
pub enum PersonInboxActivities { pub enum PersonInboxActivities {
Follow(Follow),
AcceptFollow(AcceptFollow), AcceptFollow(AcceptFollow),
UndoFollow(UndoFollow), UndoFollow(UndoFollow),
CreateOrUpdatePrivateMessage(CreateOrUpdateChatMessage), CreateOrUpdatePrivateMessage(CreateOrUpdateChatMessage),
@ -135,7 +136,7 @@ mod tests {
PersonInboxActivitiesWithAnnouncable, PersonInboxActivitiesWithAnnouncable,
SiteInboxActivities, SiteInboxActivities,
}, },
protocol::tests::test_parse_lemmy_item, protocol::tests::{test_json, test_parse_lemmy_item},
}; };
#[test] #[test]
@ -160,6 +161,8 @@ mod tests {
"assets/lemmy/activities/create_or_update/create_private_message.json", "assets/lemmy/activities/create_or_update/create_private_message.json",
) )
.unwrap(); .unwrap();
test_json::<PersonInboxActivitiesWithAnnouncable>("assets/mastodon/activities/follow.json")
.unwrap();
} }
#[test] #[test]

View file

@ -9,5 +9,5 @@ export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
# so to load the config we need to traverse to the repo root # so to load the config we need to traverse to the repo root
export LEMMY_CONFIG_LOCATION=../../config/config.hjson export LEMMY_CONFIG_LOCATION=../../config/config.hjson
RUST_BACKTRACE=1 \ RUST_BACKTRACE=1 \
cargo test --workspace --all-features --no-fail-fast cargo test -p lemmy_apub --all-features --no-fail-fast
# Add this to do printlns: -- --nocapture # Add this to do printlns: -- --nocapture