|
|
@ -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]
|
|
|
|