Skip to content

Commit

Permalink
Fix Announce/Delete AP deliver
Browse files Browse the repository at this point in the history
  • Loading branch information
atsu1125 committed Dec 27, 2023
1 parent 389b86d commit 2d6a525
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions src/remote/activitypub/renderer/undo.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import config from '../../../config';
import { ILocalUser, User } from '../../../models/entities/user';

export default (object: any, user: ILocalUser | User) => ({
type: 'Undo',
actor: `${config.url}/users/${user.id}`,
object
});
export default (object: any, user: ILocalUser | User) => {
if (object == null) return null;

return {
type: 'Undo',
actor: `${config.url}/users/${user.id}`,
object
};
};
2 changes: 1 addition & 1 deletion src/services/note/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default async function(user: User, note: Note, quiet = false) {
});

//#region ローカルの投稿なら削除アクティビティを配送
if (Users.isLocalUser(user)) {
if (Users.isLocalUser(user) && !note.localOnly) {
let renote: Note | undefined;

// if deletd note is renote
Expand Down

0 comments on commit 2d6a525

Please sign in to comment.