Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

Making this work with multiple channels and hubot #5

Open
devTechi opened this issue Nov 27, 2015 · 4 comments
Open

Making this work with multiple channels and hubot #5

devTechi opened this issue Nov 27, 2015 · 4 comments

Comments

@devTechi
Copy link
Contributor

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)

@jwilander
Copy link
Member

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.

@devTechi
Copy link
Contributor Author

devTechi commented Dec 1, 2015

Ok. Will see if I can do it tomorrow.

devTechi added a commit to devTechi/mattermost-integration-giphy that referenced this issue Dec 2, 2015
jwilander added a commit that referenced this issue Dec 17, 2015
…nels

Now it is possible to have giphy support in multiple channels (see: #5)
@devTechi
Copy link
Contributor Author

@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 😊

@Lujeni
Copy link

Lujeni commented Mar 14, 2016

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: numberly#1

Regard

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants