Remove unwrap

fix-activity-list-test
Felix Ableitner 2022-11-14 15:30:44 +01:00
parent a0fed24cee
commit 0b86ffbdbd
1 changed files with 4 additions and 1 deletions

View File

@ -119,7 +119,10 @@ impl AnnounceActivity {
let announcable_page = RawAnnouncableActivities { let announcable_page = RawAnnouncableActivities {
id: c.object.id.clone().into_inner(), id: c.object.id.clone().into_inner(),
actor: c.actor.clone().into_inner(), actor: c.actor.clone().into_inner(),
other: serde_json::to_value(c.object)?.as_object().unwrap().clone(), other: serde_json::to_value(c.object)?
.as_object()
.expect("is object")
.clone(),
}; };
let announce_compat = AnnounceActivity::new(announcable_page, community, context)?; let announce_compat = AnnounceActivity::new(announcable_page, community, context)?;
send_lemmy_activity(context, announce_compat, community, inboxes, false).await?; send_lemmy_activity(context, announce_compat, community, inboxes, false).await?;