All Projects → moussetc → mattermost-plugin-giphy

moussetc / mattermost-plugin-giphy

Licence: Apache-2.0 License
A Giphy/Gfycat/Tenor plugin for Mattermost (/gif&/gifs commands)

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to mattermost-plugin-giphy

mattermost-plugin-jenkins
A Mattermost plugin to interact with Jenkins
Stars: ✭ 25 (-44.44%)
Mutual labels:  mattermost-plugin
mattermost-plugin-antivirus
Antivirus plugin for scanning files uploaded to Mattermost
Stars: ✭ 30 (-33.33%)
Mutual labels:  mattermost-plugin
mattermost-plugin-autotranslate
No description or website provided.
Stars: ✭ 34 (-24.44%)
Mutual labels:  mattermost-plugin
mattermost-plugin-spoiler
A Mattermost plugin to add a command for spoiler messages
Stars: ✭ 17 (-62.22%)
Mutual labels:  mattermost-plugin
mattermost-plugin-memes
Add culture to your Mattermost with memes 🔌
Stars: ✭ 59 (+31.11%)
Mutual labels:  mattermost-plugin
mattermost-plugin-voice
Mattermost plugin for voice messaging. 🎤 🔉
Stars: ✭ 64 (+42.22%)
Mutual labels:  mattermost-plugin
mattermost-plugin-starter-template
Build scripts and templates for writing Mattermost plugins.
Stars: ✭ 74 (+64.44%)
Mutual labels:  mattermost-plugin
mattermost-plugin-agenda
Mattermost plugin to handle meeting agendas
Stars: ✭ 20 (-55.56%)
Mutual labels:  mattermost-plugin
mattermost-plugin-walltime
Timezone Message Convert for Mattermost 🕛 🕒 🕕 🕘
Stars: ✭ 25 (-44.44%)
Mutual labels:  mattermost-plugin
mattermost-rtl
Adds RTL support to Mattermost
Stars: ✭ 52 (+15.56%)
Mutual labels:  mattermost-plugin
mattermost-plugin-autolink
Automatically rewrite text matching a regular expression into a markdown link.
Stars: ✭ 100 (+122.22%)
Mutual labels:  mattermost-plugin
mattermost-plugin-zoom
Zoom plugin for Mattermost 🔌
Stars: ✭ 93 (+106.67%)
Mutual labels:  mattermost-plugin
mattermost-plugin-wrangler
Manage Mattermost Messages Masterfully!
Stars: ✭ 33 (-26.67%)
Mutual labels:  mattermost-plugin
mattermost-plugin-custom-attributes
Mattermost plugin for adding custom attributes to users!
Stars: ✭ 26 (-42.22%)
Mutual labels:  mattermost-plugin
mattermost-plugin-google-calendar
Mattermost Google Calendar Plugin
Stars: ✭ 22 (-51.11%)
Mutual labels:  mattermost-plugin
mattermost-plugin-github
GitHub plugin for Mattermost
Stars: ✭ 112 (+148.89%)
Mutual labels:  mattermost-plugin
mattermost-plugin-apps
Powers the Mattermost App Framework
Stars: ✭ 29 (-35.56%)
Mutual labels:  mattermost-plugin
mattermost-plugin-alertmanager
AlertManager Bot for Mattermost
Stars: ✭ 48 (+6.67%)
Mutual labels:  mattermost-plugin
mattermost-plugin-demo
A demo of what Mattermost plugins can do.
Stars: ✭ 52 (+15.56%)
Mutual labels:  mattermost-plugin
mattermost-plugin-todo
Mattermost plugin for tracking to do items
Stars: ✭ 45 (+0%)
Mutual labels:  mattermost-plugin

Mattermost GIF commands plugin (ex-'GIPHY plugin') Build Status

Maintainer: @moussetc

A Mattermost plugin to post GIFs from Gfycat, Giphy or Tenor with slash commands, available on the official Mattermost Plugin MarketPlace.

Usage

Plugin v2.0.0 & higher

Use the command /gif "<keywords>" "<custom caption>" to search for a GIF and shuffle through GIFs until you find one you like. You can also use /gif <keywords> if you don't want to add a custom caption.

Example: first choose a GIF with /gif "waving cat" "Hello!" and use the Shuffle button to browse others GIFs:

demo

Then post the GIF you want using the Send button:

demo.

If you prefer having both the /gif (post GIF without previewing!) AND /gifs (preview and choose GIF before posting) as in the previous versions of the plugin, you can disable the 'Force GIF preview before posting' in the plugin configuration.

Older versions

  • Send a GIF directly with /gif <keywords>:

demo

  • Choose a GIF privately before sending with /gifs <keywords>:

demo

Compatibility

Use the following table to find the correct plugin version for each Mattermost server version:

Mattermost server Plugin release Incompatibility
5.20 and higher v1.2.x and higher breaking plugin manifest change
5.12 to 5.19 v1.1.x breaking plugin API change
5.10 to 5.11 v1.0.x buttons on ephemeral posts
5.2 to 5.9 v0.2.0
4.6 to 5.1 v0.1.x
below not supported plugins can't create slash commands

Installation and configuration

In Mattermost 5.16 and later:

  1. In Mattermost, go to Main Menu > Plugin Marketplace.
  2. Search for the "GIF Commands" plugin, then click Install to install it.
  3. Once the installation is completed, click Configure. This will take you to System Console to configure the plugin.
  4. Choose if you want to use Gfycat (default), GIPHY or Tenor (both of which requires an API key, see below).
  5. If you've chosen Giphy or Tenor, configure the API key as explained on the configuration page.
  6. You can also configure the following settings :
    • display style (non-collapsable embedded image or collapsable full URL preview)
    • rendition style (GIF size, quality, etc.)
    • rating (not available for Gfycat)
    • language (not available for Gfycat)
  7. Activate the plugin in the System Console > Plugins Management > Management page

If you are running Mattermost 5.15 or earlier, or do not have the Plugin Marketplace enabled, follow these steps:

  1. Go to the Releases page and download the .tar.gz package. Supported platforms are: Linux x64, Windows x64, Darwin x64, FreeBSD x64.
  2. Use the Mattermost System Console > Plugins Management > Management page to upload the .tar.gz package
  3. Go to the System Console > Plugins > GIF commands and follow the same configuration steps as for the Marketplace install, displayed from Step 4. on the previous §.

Configuration Notes in HA

If you are running Mattermost v5.11 or earlier in High Availability mode, please review the following:

  1. To install the plugin, use these documented steps
  2. Then, modify the config.json using the standard doc steps to the following (check the plugin.json file to see the lists of options for language, rating, rendition, etC.).
 "PluginSettings": {
        // [...]
        "Plugins": {
            "com.github.moussetc.mattermost.plugin.giphy": {
                "displaymode": "embedded",
                "provider": "<giphy or gfycat or tenor>",
                "apikey": "<your API key from Step 4. above, if you've choosen Giphy or Tenor as your GIF provider>", 
                "language": "en",
                "rating": "",
                "rendition": "fixed_height_small",
                "renditiongfycat": "100pxGif",
                "renditiontenor": "mediumgif",
                "disablepostingwithoutpreview": true
            },
        },
        "PluginStates": {
            // [...]
            "com.github.moussetc.mattermost.plugin.giphy": {
                "Enable": true
            },
        }
    }

TROUBLESHOOTING

I can't upload or activate the plugin

  • Is your plugin version compatible with your server version? Check the Compatibility section in the README.
  • Make sure you have configured the SiteURL setting correctly in the Mattermost administration panel.
  • Check the Mattermost logs (yourURL/admin_console/logs) for more detail on why the activation failed.

Error 'Command with a trigger of /gif not found'

This happens when the plugin is not activated, see above section.

Error 'Unable to get GIF URL'

Start by checking the Mattermost logs (yourURL/admin_console/logs) for more detail. Usual causes include:

  • Using GIPHY as provider and using the public beta Giphy. The log will looks like: {"level":"error", ... ,"msg":"Unable to get GIF URL", ... ,"method":"POST","err_where":"Giphy Plugin","http_code":400,"err_details":"Error HTTP status 429: 429 Unknown Error"}. Solution: get your own GIPHY API key as the default one shouldn't be used in production.
  • If your Mattermost server is behind a proxy:
    • If the proxy blocks Giphy, Tenor and Gfycat: there's no solution besides convincing your security department that accessing Giphy is business-critical.
    • If the proxy allows Giphy, Tenor and Gfycat: configure your Mattermost server to use your outbound proxy.

The picture doesn't load

  • Your client (web client, desktop client, etc.) might be behind a proxy that blocks GIPHY, Tenor or Gfycat. Solution: activate the Mattermost image proxy.
  • If the Display Mode configured is "Collapsable Image Preview", then the link previews option must be configured in the System Console (> Posts > Enable Link Previews). Do note that user can also change this option in their Account Settings.

There are no buttons on the shuffle message

  • Check your Mattermost version with the compatibility list at the top of this page.

Development

To build the plugin:

make

This will produce a single plugin file (with support for multiple architectures) for upload to your Mattermost server:

dist/com.example.my-plugin.tar.gz

There is a build target to automate deploying and enabling the plugin to your server, but it requires configuration and http to be installed:

export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_USERNAME=admin
export MM_ADMIN_PASSWORD=password
make deploy

Alternatively, if you are running your mattermost-server out of a sibling directory by the same name, use the deploy target alone to unpack the files into the right directory. You will need to restart your server and manually enable your plugin.

How do I share feedback on this plugin?

Feel free to create a GitHub issue or to contact me at @cmousset on the community Mattermost instance to discuss.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].