Emojis are small, digital images or icons used to communicate or express concepts such as emotions and physical gestures in messages. In addition to the default set of emojis that ship with Mattermost, users can supplement Mattermost standard emojis with by uploading custom emojis.
To hide a standard emoji in a Mattermost deployment, a System Admin must first identify each emoji by name, then rebuild their self-hosted instance of the Mattermost webapp to hide the emojis in the web app as well as the Desktop App.
- Emojis hidden in the webapp and Desktop App will be available in the mobile apps.
- It’s not possible to remove standard emojis from Mattermost Cloud deployments.
- Hiding emojis using the method below doesn’t stop users from using unicode characters to apply a hidden emoji.
- Customers who upgrade Mattermost using the standard upgrade process will see the hidden emoji return following the upgrade. This is because the standard upgrade process retains only plugin data in
mattermost/client/plugins, and doesn’t retain emoji data.
To remove a standard emoji from the Mattermost Emoji Picker:
- Clone the mattermost-webapp repository by running:
git clone --depth=1 https://github.com/mattermost/mattermost-webapp
- In Mattermost Channels, identify the names of the emojis to remove by hovering over over an emoji in the Emoji Picker, and noting its name in the format
:name:. For example:
- Create a TXT file, such as
excludedemojis.txtthat contains a list of the emojis to remove. Add each emoji name as a separate line.
- Navigate to the mattermost-webapp directory from step 1 by running:
- Install nvm by following these instructions.
- Install the correct node version for the webapp by running
- Download the node packages in the webapp by running
- Use npm to invoke the script emoji_gen.mjs. For example:
npm run make-emojis -- --excluded-emoji-file .path-to-file/excludedemojis.txt.
- Build and package the modified mattermost-webapp by running
- Remove the existing client directory within the Mattermost install directory by running
rm -r /opt/mattermost/client.
- Extract the generated tar into the Mattermost install directory by running
sudo tar -xvf mattermost-webapp.tar.gz -C /opt/mattermost.
- Ensure the files are owned by the Mattermost service account by running
sudo chown mattermost:mattermost /opt/mattermost.
- Restart Mattermost. The offending emoji are hidden from the Mattermost Emoji Picker in the webapp and the Desktop App.