Delete Post

There are two kinds of post deletion:

  1. Soft delete

    The post is only marked as deleted. This means that the post still exists in the database but the isDeleted flag is set to true.

  2. Hard delete

    The post data, along with its reactions, comments, children posts, and children of children posts data are removed from the database. Thus, all data related to the post will be lost and irretrievable. Hard deleting children post will not delete the parent post.

    Hard deleting posts, as well as comments, is only supported via SDK. UIKit and Console support may be considered in the future.

AmityPostRepository provides a convenient method to delete posts. In deleting a post, you need to pass the postId and a boolean parameter. Set the boolean parameter to true for hard delete and false for soft delete.

Only the post owner or an admin can update and/or delete a post.

Last updated