Use Follow::build_undo07() instead of build_undo()

This commit is contained in:
Kitaiti Makoto
2022-05-03 00:41:05 +09:00
parent e4180b3b38
commit f44bca30f4
2 changed files with 7 additions and 44 deletions
+2 -2
View File
@@ -105,7 +105,7 @@ pub fn follow(
) -> Result<Flash<Redirect>, ErrorPage> {
let target = User::find_by_fqn(&conn, &name)?;
let message = if let Ok(follow) = follows::Follow::find(&conn, user.id, target.id) {
let delete_act = follow.build_undo(&conn)?;
let delete_act = follow.build_undo07(&conn)?;
local_inbox(
&conn,
serde_json::to_value(&delete_act).map_err(Error::from)?,
@@ -114,7 +114,7 @@ pub fn follow(
let msg = i18n!(rockets.intl.catalog, "You are no longer following {}."; target.name());
rockets
.worker
.execute(move || broadcast(&user, delete_act, vec![target], CONFIG.proxy().cloned()));
.execute(move || broadcast07(&user, delete_act, vec![target], CONFIG.proxy().cloned()));
msg
} else {
let f = follows::Follow::insert(