superseriousbusiness / gotosocial

Fast, fun, small ActivityPub server.
https://docs.gotosocial.org
GNU Affero General Public License v3.0
3.84k stars 336 forks source link

[feature] Unsuspending an Account #3539

Open zxzzxv opened 1 week ago

zxzzxv commented 1 week ago

Is your feature request related to a problem ?

While testing out the latest version, I was trying out the reporting system and accidentally suspended a non-test user. The text says account suspensions are irreversible. Are there any plans to make it possible to unsuspend users?

Describe the solution you'd like.

I'd like something like Mastodon where suspends remove all posts and media, and unsuspends means the server can start to federate with that user as normal.

Describe alternatives you've considered.

I have considered just nuking my instance and restarting things since it's still mostly a dev instance. No one but test accounts is following the server now. But it would be nice to be able to unsuspend accounts.

Additional context.

No response

tsmethurst commented 1 week ago

Good idea yeah, there's a few technical things we'll have to think about there (like do we still send a Delete message out or not), but we can cross that bridge when we come to it.

zxzzxv commented 1 week ago

Thanks! Just for clarity this was a remote user not on the server. Are there any manual ways to undo this if I am ok making changes to the db? Or is this all danger zone stuff?

tsmethurst commented 1 week ago

Hummm. Yes, you should be able to undo it by setting suspended_at to NULL for that account in the accounts table.

So something like:

UPDATE accounts
SET suspended_at = NULL
WHERE username = 'some_username'
AND domain = 'some_domain';

You'll then have to restart your GtS instance to invalidate the in-memory cache.