fix: include a link to hashtag collection

i don't think this is necessary but mastodon seems to not recognize my
hashtags if i don't do this?
This commit is contained in:
əlemi 2025-01-23 14:14:43 +01:00
parent 1762764862
commit a8808c3a95
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -24,11 +24,12 @@ pub struct RichHashtag {
}
impl IntoActivityPub for RichHashtag {
fn into_activity_pub_json(self, _ctx: &crate::Context) -> serde_json::Value {
fn into_activity_pub_json(self, ctx: &crate::Context) -> serde_json::Value {
use apb::LinkMut;
apb::new()
.set_name(Some(format!("#{}", self.hash.name)))
.set_link_type(Some(apb::LinkType::Hashtag))
.set_href(Some(crate::url!(ctx, "/tags/{}", self.hash.name)))
}
}