Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe82cbb

Browse files
committed
Fix post deletion on Pleroma
See: https://git.pleroma.social/pleroma/pleroma/issues/1481 Fixes #223
1 parent f8a40fa commit fe82cbb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

activitypub.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,12 @@ func deleteFederatedPost(app *App, p *PublicPost, collID int64) error {
600600
na.CC = append(na.CC, f)
601601
}
602602

603-
err = makeActivityPost(app.cfg.App.Host, actor, si, activitystreams.NewDeleteActivity(na))
603+
da := activitystreams.NewDeleteActivity(na)
604+
// Make the ID unique to ensure it works in Pleroma
605+
// See: https://git.pleroma.social/pleroma/pleroma/issues/1481
606+
da.ID += "#Delete"
607+
608+
err = makeActivityPost(app.cfg.App.Host, actor, si, da)
604609
if err != nil {
605610
log.Error("Couldn't delete post! %v", err)
606611
}

0 commit comments

Comments
 (0)