No description
  • Go 58.1%
  • Makefile 19.3%
  • TypeScript 18%
  • JavaScript 4.2%
  • SCSS 0.4%
Find a file
Felipe M. a1e70da201
All checks were successful
ci / test (push) Successful in 4m53s
ci / lint (push) Successful in 5m19s
ci / build (push) Successful in 4m2s
Fix channel cleanup skipping posts across paginated deletes.
Offset-based pagination advanced after each page even though deletions
shift remaining posts, so large cleanups silently left messages behind.
Also page through all auto-cleanup KV keys and log individual delete failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 15:58:41 +02:00
.github/workflows Add Mattermost plugin for system-admin channel cleanup. 2026-07-25 18:46:39 +02:00
assets Add Mattermost plugin for system-admin channel cleanup. 2026-07-25 18:46:39 +02:00
build Migrate from npm to bun 2026-07-25 18:59:34 +02:00
server Fix channel cleanup skipping posts across paginated deletes. 2026-07-30 15:58:41 +02:00
webapp Add automatic channel cleanup with unified modal UI. 2026-07-28 18:35:24 +02:00
.editorconfig Add Mattermost plugin for system-admin channel cleanup. 2026-07-25 18:46:39 +02:00
.gitattributes Add Mattermost plugin for system-admin channel cleanup. 2026-07-25 18:46:39 +02:00
.gitignore Add Mattermost plugin for system-admin channel cleanup. 2026-07-25 18:46:39 +02:00
.gitpod.yml Add Mattermost plugin for system-admin channel cleanup. 2026-07-25 18:46:39 +02:00
.golangci.yml Add Mattermost plugin for system-admin channel cleanup. 2026-07-25 18:46:39 +02:00
go.mod Add automatic channel cleanup with unified modal UI. 2026-07-28 18:35:24 +02:00
go.sum Add Mattermost plugin for system-admin channel cleanup. 2026-07-25 18:46:39 +02:00
LICENSE Add Mattermost plugin for system-admin channel cleanup. 2026-07-25 18:46:39 +02:00
Makefile Migrate from npm to bun 2026-07-25 18:59:34 +02:00
plugin.json Add automatic channel cleanup with unified modal UI. 2026-07-28 18:35:24 +02:00
README.md Add Mattermost plugin for system-admin channel cleanup. 2026-07-25 18:46:39 +02:00

Cleanup Channel

A Mattermost plugin that lets system administrators remove all messages from a channel.

Features

  • Channel menu action: "Remove all messages" appears in the channel header menu for system administrators only.
  • Slash command: /cleanup-channel removes all messages from the current channel (system administrators only).
  • Defense in depth: Both the web app and server verify that the user is a system administrator before performing any cleanup.

Build

make dist

The plugin bundle is written to dist/com.fmartingr.mattermost-plugin-cleanup-channel-*.tar.gz.

Usage

  1. Upload and enable the plugin in System Console → Plugins → Plugin Management.
  2. As a system administrator, open a channel and use the channel header menu () → Remove all messages.
  3. Or run /cleanup-channel in the channel you want to clean up.

Both actions ask for confirmation before deleting messages.

Development

make deploy

Requires a local Mattermost server configured for plugin development. See the Mattermost plugin developer guide.