FIX: perform `agree_and_keep` action only if possible. (PR #13967)

While deleting spammers from flag modal it’s trying to perform agree_and_keep action where it’s not possible (or already performed).

GitHub

We need a test here :slight_smile:

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

Could this still fail if @actor doesn’t have enough permissions, even if the system user can agree with the flag? Maybe we should check using @guardian instead?

it’s done.

Looks great. Thanks!