Skip to content

Conversation

@melroy89
Copy link
Member

@melroy89 melroy89 commented Mar 23, 2025

Reducing spam messages (like the infamous fediverse chick) by introducing a command. Meaning admins no longer need to use manual DB queries. Its just simpler.

This new command (./bin/console mbin:messages:remove_and_ban), allows you to easily search on direct messages. And remove all the matched messages and ban the senders user from the instance.

Hint: If you want to search on strings with spaces its just a shell script basically, so use quotes around the body query in those cases and it will work fine:

./bin/console mbin:messages:remove_and_ban "Fediverse Chick"

  1. Search query is executed. And displayed in a very nice ASCII table:
    image
  2. User input requested to continue:
    image
  3. If y(es), then we continue with banning the users and removing the direct messages.

@melroy89 melroy89 added enhancement New feature or request backend Backend related issues and pull requests labels Mar 23, 2025
@melroy89 melroy89 added this to the v1.8.1 milestone Mar 23, 2025
@melroy89 melroy89 enabled auto-merge (squash) March 23, 2025 17:21
@melroy89 melroy89 merged commit 9c25b11 into main Mar 23, 2025
7 checks passed
@melroy89 melroy89 deleted the add_ban_and_remove branch March 23, 2025 17:50
@melroy89
Copy link
Member Author

Documentation follow up PR: #1515

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

Labels

backend Backend related issues and pull requests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants