feat: room(分区)

This commit is contained in:
2022-08-19 09:59:44 +08:00
parent dbb5732938
commit 0e1a088575
10 changed files with 66 additions and 16 deletions

View File

@@ -235,7 +235,7 @@ impl Ugc for Post {
self.is_deleted
}
fn extra_delete_condition(&self) -> bool {
!self.content.starts_with("[系统自动代发]\n")
self.room_id != 42
}
async fn do_set_deleted(&mut self, db: &Db) -> Api<()> {
update!(*self, posts, db, { is_deleted, to true });