Mattermost Plugin Attachments Remover banner
mattermost mattermost

Mattermost Plugin Attachments Remover

Development community

Description

Mattermost plugin for removing attachments from posts

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Attachment Remover

[![ci](https://github.com/mattermost/mattermost-plugin-attachments-remover/actions/workflows/ci.yml/badge.svg)](https://github.com/mattermost/mattermost-plugin-attachments-remover/actions/workflows/ci.yml)

Features

  • Adds a post menu option to remove attachments
  • Only post author or user with permission to edit other's post can remove attachments
  • Respects the PostEditTimeLimit setting
  • If post contains no message (only attachments) the post is removed

Usage

  1. Click on the post actions menu (four squares at the top right of the post, see screenshot)
  2. Click on the "Remove Attachments" option.

![Usage](.readme/usage.jpg)

Development

To avoid having to manually install your plugin, build and deploy your plugin using one of the following options. In order for the below options to work, you must first enable plugin uploads via your config.json or API and restart Mattermost.

    "PluginSettings" : {
        ...
        "EnableUploads" : true
    }

Deploying with Local Mode

If your Mattermost server is running locally, you can enable [local mode](https://docs.mattermost.com/administration/mmctl-cli-tool.html#local-mode) to streamline deploying your plugin. Edit your server configuration as follows:

{
    "ServiceSettings": {
        ...
        "EnableLocalMode": true,
        "LocalModeSocketLocation": "/var/tmp/mattermost_local.socket"
    },
}

and then deploy your plugin:

make deploy

You may also customize the Unix socket path:

export MM_LOCALSOCKETPATH=/var/tmp/alternate_local.socket
make deploy

If developing a plugin with a webapp, watch for changes and deploy those automatically:

export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_TOKEN=j44acwd8obn78cdcx7koid4jkr
make watch

Deploying with credentials

Alternatively, you can authenticate with the server's API with credentials:

export MM_SERVICESETTINGS_SITEURL=http://localho