From d5a3c3d7d7d6b68c97a47def063ca38d852d62c0 Mon Sep 17 00:00:00 2001 From: hole-thu Date: Wed, 31 Aug 2022 21:29:55 +0800 Subject: [PATCH] disable no room warning --- src/api/post.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/api/post.rs b/src/api/post.rs index 79a2698..f0c247c 100644 --- a/src/api/post.rs +++ b/src/api/post.rs @@ -188,21 +188,12 @@ pub async fn publish_post( db: Db, rconn: RdsConn, ) -> JsonApi { - let text = if poi.room_id.is_none() { - format!( - "{}\n\n---\n\n\\* 无效分区或来自旧版前端,已默认归档到0区。分区管理说明见 #100426,建议尽快更新前端(点击ⓘ ,点击“立即更新”)。", - &poi.text - ) - } else { - poi.text.to_string() - }; - let use_title = poi.use_title.is_some() || user.is_admin || user.is_candidate; let p = Post::create( &db, NewPost { - content: text, + content: poi.text.to_string(), cw: poi.cw.to_string(), author_hash: user.namehash.to_string(), author_title: if use_title {