Skip to content

Added the ability for superuser or creators "remove" / hide the post from the feed#52

Open
Pdzly wants to merge 4 commits into
whysodank:masterfrom
Pdzly:feature/post-delete
Open

Added the ability for superuser or creators "remove" / hide the post from the feed#52
Pdzly wants to merge 4 commits into
whysodank:masterfrom
Pdzly:feature/post-delete

Conversation

@Pdzly
Copy link
Copy Markdown
Contributor

@Pdzly Pdzly commented Jun 7, 2025

Only a superuser can restore it.

@isik-kaplan i know already i will have to rewrite a lot of things as i am not sure how to handle this correctly.

Copy link
Copy Markdown
Contributor

@isik-kaplan isik-kaplan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome PR, I just have some nitpicks as always

Also I wasn't planning on removal of posts so people who bookmarked posts can always come back and see the posts they bookmarked but we can add it as a separate feature so if someone bookmarks a post it is automatically added to a hidden library so even if the original is deleted/hidden we can let them keep it in their own library

And maybe as a followup we can add a feature similar to repost detection and not allow reposts of previously hidden posts (if a superuser hid them) so less moderation is required. Not in this PR though obviously

Comment thread wsd/apps/core/models/post.py Outdated
Comment thread wsd/apps/rest/v0/views/post.py Outdated
Comment thread wsd/apps/rest/v0/views/post.py Outdated
Comment thread wsd/apps/rest/v0/views/post.py Outdated
Comment thread wsd/apps/user/admin/__init__.py Outdated
admin.site.unregister(SocialToken)
admin.site.unregister(SocialAccount)
admin.site.unregister(EmailAddress)
# admin.site.unregister(EmailAddress)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for this?

Copy link
Copy Markdown
Contributor Author

@Pdzly Pdzly Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops sry, as i can not migrate down, i had to redo all so i did it like #7 forgot to undo this. Sry

The reason why i cant migrate down is, the user "wsd" is not available from the host machine and even if i expose the network to the public it always says password is wrong for the user wsd.

This works but it still gets a warning that the runtimewarning.
python manage.py makemigrations core
RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: password authentication failed for user "wsd"

Comment thread wsd-frontend/src/components/wsd/Meme/client/MemeThreeDotMenu.tsx Outdated
… handlers, models, serializers, API endpoints, triggers, and UI.
@Pdzly
Copy link
Copy Markdown
Contributor Author

Pdzly commented Jun 10, 2025

@isik-kaplan i am unsure as Posts will still be visibible for example in the Profile view, as that is a server component. And should i make that a client? or what would you do? or is it just ok that it would just show the user "Post not found" message there.

Added a "Hidden" flag for the superuser.

@Pdzly
Copy link
Copy Markdown
Contributor Author

Pdzly commented Jun 10, 2025

I dont know if it is a good idea to keep "hidden" posts of the users data. ( i know most things arent OC but still... could become a drama if a user wants their data gone or hidden but some bookmarked post stays. )

If you want to do it, then just ignore the is_hidden attribute = the bookmarked result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants