Skip to content

Chat: remove unused Mattermost admin API routes #1382

Description

@feruzm

Follow-up to #1380 and the panel removal. Once moderation runs through chat commands, the admin routes have no caller: the moderation service talks to Mattermost directly rather than through the web app.

Scope

Remove api/mattermost/admin/:

  • check-permissions
  • cleanup-inactive
  • users/[username]/{ban,deactivate,delete-account,dm-posts,nuke,posts}

and the server helpers that become unreachable in server/mattermost.ts.

Notes

  • cleanup-inactive is not being ported to a command. It mass-deactivates by Hive inactivity, deactivation is not durable because the proxy reactivates the account on next login, and it has never been wired to any UI. If the capability is wanted later it belongs in a scheduled job with an explicit dry-run, not an interactive command.
  • deactivate has a client hook but no caller, so it is already dead.
  • Keep requireMattermostSuperAdmin and hasSystemAdminRole if anything else references them; drop otherwise.
  • channels/[channelId]/posts/[postId] DELETE is NOT in scope, see the panel removal issue.

Do not merge until the command path has run in production for a full moderation cycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions