mattermost-integration-giphy icon indicating copy to clipboard operation
mattermost-integration-giphy copied to clipboard

Making this work with multiple channels and hubot

Open devTechi opened this issue 9 years ago • 4 comments

Hello,

first of all thanks for this.

In order to work with hubot at the same time we need to change some environment variables, at least I did. I changed yours to the following

MATTERMOST_TOKEN to MATTERMOST_GIPHY_TOKEN (and of course everywhere it is used)

and

port = int(os.environ.get('PORT', 5000)) to port = int(os.environ.get('GIPHYPORT', 5000))

To support multiple channels I changed the line if data['token'] != MATTERMOST_GIPHY_TOKEN: to MATTERMOST_GIPHY_TOKEN.find(data['token']) == -1:

After that you just need to create an outgoing webhook for every channel in every team and put it (perhaps comma separated) to your environment variable.

Works fine that way.

P.s.: for security reasons I changed the line app.run(host='0.0.0.0', port=port) to app.run(host='127.0.0.1', port=port)

devTechi avatar Nov 27 '15 13:11 devTechi

Thanks @devTechi ! This is useful information. If you'd like to submit a PR to fix some or all of that I'd gladly accept it.

jwilander avatar Dec 01 '15 20:12 jwilander

Ok. Will see if I can do it tomorrow.

devTechi avatar Dec 01 '15 21:12 devTechi

@jwilander I've got an OT question concerning the Android app in development. Is it possible for me to test it? Or where should I ask for that? Thx :blush:

devTechi avatar Jan 26 '16 10:01 devTechi

Hello,

After that you just need to create an outgoing webhook for every channel in every team and put it (perhaps comma separated) to your environment variable.

You should use a slash command (it's cross channels). Our fork support this feature: https://github.com/numberly/mattermost-integration-giphy/issues/1

Regard

Lujeni avatar Mar 14 '16 14:03 Lujeni