From c37ff54857994dabb01471ac79b043f8d1019411 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 21 Mar 2022 06:38:39 +0900 Subject: [PATCH] Fix Post::to_activity07() --- plume-models/src/posts.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plume-models/src/posts.rs b/plume-models/src/posts.rs index ced57612..def48c3a 100644 --- a/plume-models/src/posts.rs +++ b/plume-models/src/posts.rs @@ -454,7 +454,11 @@ impl Post { .expect("OffsetDateTime"), ); article.set_summary(&*self.subtitle); - article.set_tag(AnyBase::from_arbitrary_json(json!(mentions_json))?); + article.set_many_tags( + mentions_json + .iter() + .filter_map(|mention_json| AnyBase::from_arbitrary_json(mention_json).ok()), + ); if let Some(media_id) = self.cover_id { let media = Media::get(conn, media_id)?;