From ce425242739e24e838b43ba942a837025c44505d Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Tue, 3 May 2022 00:50:43 +0900 Subject: [PATCH] Remote trailng 07 from Note in comments.rs --- plume-models/src/comments.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plume-models/src/comments.rs b/plume-models/src/comments.rs index 499f4a32..0b546d65 100644 --- a/plume-models/src/comments.rs +++ b/plume-models/src/comments.rs @@ -16,7 +16,7 @@ use activitystreams::{ base::{AnyBase, Base}, iri_string::types::IriString, link::{self, kind::MentionType}, - object::{Note as Note07, Tombstone}, + object::{Note, Tombstone}, prelude::*, primitives::OneOrMany, time::OffsetDateTime, @@ -111,7 +111,7 @@ impl Comment { .unwrap_or(false) } - pub fn to_activity07(&self, conn: &DbConn) -> Result { + pub fn to_activity07(&self, conn: &DbConn) -> Result { let author = User::get(conn, self.author_id)?; let (html, mentions, _hashtags) = utils::md_to_html( self.content.get().as_ref(), @@ -120,7 +120,7 @@ impl Comment { Some(Media::get_media_processor(conn, vec![&author])), ); - let mut note = Note07::new(); + let mut note = Note::new(); let to = vec![PUBLIC_VISIBILITY.parse::()?]; note.set_id( @@ -219,13 +219,13 @@ impl Comment { impl FromId for Comment { type Error = Error; - type Object = Note07; + type Object = Note; fn from_db07(conn: &DbConn, id: &str) -> Result { Self::find_by_ap_url(conn, id) } - fn from_activity07(conn: &DbConn, note: Note07) -> Result { + fn from_activity07(conn: &DbConn, note: Note) -> Result { let comm = { let previous_url = note .in_reply_to()