LemmyNet / jerboa

A native android app for Lemmy
GNU Affero General Public License v3.0
1.17k stars 167 forks source link

Posts with `removed: true` are being displayed #989

Closed alexandruchircu closed 1 year ago

alexandruchircu commented 1 year ago

Jerboa Version 0.0.38

Describe the bug Posts listing does not respect the "removed": true property

To Reproduce Steps to reproduce the behavior:

Not 100% sure about these, sorry...

  1. Have admin rights on a Lemmy instance (let's say mylemmy.net)
  2. While logged in to mylemmy.net, visit an outside community (let's say mylemmy.net/c/somethingcool@otherlemmy.org)
  3. Probably need to subscribe to the outside community, not sure though
  4. Remove the outside community
  5. Do a "UPDATE post SET removed=true WHERE community_id=" that external community

The idea is to have posts with "removed": true (the community is also removed).

Now, get this in /api/v3/post/list?auth=XYZ&other&options:

Have a post with `"removed": true` "post": { "id": 15597, "name": "He convinced you to dress up for fun, and what fun you had!", "url": "https://www.redgifs.com/watch/politicalcreamyyosemitetoad", "body": "Migrating all my stuff slowly from the other site. Might start adding some new stuff too!", "creator_id": 1795, "community_id": 179, "removed": true, "locked": false, "published": "2023-06-23T12:56:19.760570", "deleted": false, "nsfw": true, "embed_title": "", "embed_description": "", "ap_id": "https://lemmynsfw.com/post/77506", "local": false, "embed_video_url": "https://api.redgifs.com/v2/gifs/politicalcreamyyosemitetoad/files/PoliticalCreamyYosemitetoad.mp4", "language_id": 37, "featured_community": false, "featured_local": false }, "creator": { "id": 1795, "name": "LaurenMisrule", "banned": false, "published": "2023-06-23T04:37:22.393786", "actor_id": "https://lemmynsfw.com/u/LaurenMisrule", "local": false, "deleted": false, "admin": false, "bot_account": false, "instance_id": 2 }, "community": { "id": 179, "name": "sissycaptions", "title": "Sissy Captions", "description": "stuff", "removed": true, "published": "2023-06-12T19:11:39.182131", "updated": "2023-06-23T15:05:20.904862", "deleted": false, "nsfw": true, "actor_id": "https://lemmynsfw.com/c/sissycaptions", "local": false, "icon": "https://lemmynsfw.com/pictrs/image/71acad16-704f-4bc4-9568-b6f0cc4a55d9.png", "banner": "https://lemmynsfw.com/pictrs/image/6ce5f22e-7292-4b93-9e4b-c22256ae2761.png", "hidden": false, "posting_restricted_to_mods": false, "instance_id": 2 }, "creator_banned_from_community": false, "counts": { "id": 9187, "post_id": 15597, "comments": 0, "score": 0, "upvotes": 0, "downvotes": 0, "published": "2023-06-23T12:56:19.760570", "newest_comment_time_necro": "2023-06-23T12:56:19.760570", "newest_comment_time": "2023-06-23T12:56:19.760570", "featured_community": false, "featured_local": false, "hot_rank": 1728, "hot_rank_active": 1728 }, "subscribed": "NotSubscribed", "saved": false, "read": false, "creator_blocked": false, "unread_comments": 0

This post will be shown on Jerboa, when ListingType is "All".

dessalines commented 1 year ago

Removed posts are shown for admins on the lemmy backend, by design (so they can unremove them and such). This isn't a jerboa issue.