Fix Announce/Delete AP deliver (#7517)

* Fix Announce/Delete AP deliver

* Revert "Fix Announce/Delete AP deliver"

This reverts commit 0292c5196d.

* localOnlyのDeleteをdeliverしないように

* null Activityに対するUndoはdeliverしないように
This commit is contained in:
MeiMei 2021-05-19 16:15:01 +09:00 committed by GitHub
parent 4b33c42da7
commit b16c3798a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -1,8 +1,12 @@
import config from '@/config'; import config from '@/config';
import { ILocalUser, User } from '../../../models/entities/user'; import { ILocalUser, User } from '../../../models/entities/user';
export default (object: any, user: { id: User['id'] }) => ({ export default (object: any, user: { id: User['id'] }) => {
type: 'Undo', if (object == null) return null;
actor: `${config.url}/users/${user.id}`,
object return {
}); type: 'Undo',
actor: `${config.url}/users/${user.id}`,
object
};
};

View File

@ -35,7 +35,7 @@ export default async function(user: User, note: Note, quiet = false) {
}); });
//#region ローカルの投稿なら削除アクティビティを配送 //#region ローカルの投稿なら削除アクティビティを配送
if (Users.isLocalUser(user)) { if (Users.isLocalUser(user) && !note.localOnly) {
let renote: Note | undefined; let renote: Note | undefined;
// if deletd note is renote // if deletd note is renote