numberly/mattermost-integration-giphy

Suggestion: Let user select gif from a few samples

Opened this issue · 13 comments

It would be really cool if there could be another command that would execute the search query, and privately show the calling user maybe 3 gifs generated by the giphy search. Users would then be able to use a follow up command to select one of the images and then that is posted in the chat room for everybody to see.

e.g workflow

/gifc cat

hidden message, only visible to user:
Choose one with /gifc #
1)[gif-1]
2)[gif-2]
3)[gif-3]
4)try again
5)cancel

/gifc 2

public message

Giphy BOT
user searched for cat
[gif-2]

Hello @bangoker,

Thanks for your suggestion.
I agree, it's could be a great feature.

However, i guess it's hard to implement:

  • i dunno if it's possible on mattermost to send an hidden message.
  • this bot is a simple PING/PONG application (in this case, the bot should know the context of the first request to reply with the right gif). Maybe it's possible with the websocket API like https://github.com/LPgenerator/mattermost_bot.

Don't hesitate to give us technical solution if you can.

Thanks

Hi @Lujeni,

seems to be possible at stewie bot. If you set an ! in between command and argument, its persistent, otherwise its just viewable for you.

https://github.com/nnewman/stewie

Hi,

Could be great to add this functionality, but seems complicated for now. A feature idea is open on Mattermost forum to add some actions and buttons to webhooks (like Slack does).

Hello Guys,

I made a proof of concept, that seem to work pretty well.
For instance /gif show hello will prompt a sample of 5 relevent gif thumbnails only visible by you. By clicking on one of them, you made it visible for all.

mattermost_integration_pooc

Hope this can be used soon :)
I'll try to release these changes next week.

Wow really great !
What did you used to manage the "click to select" part ? Is that process client or server side ?

Thumbnails are just links pointing to an internal endpoint, the tricky part was to handle redirection since referer is disable in mattermost links, so for now i just serve a javascript code that close the new tab ...

Anything new on this ?
Seems Mattermost wait for someone to implement action buttons for webhook (mattermost/mattermost#6293), if anyone have Go and React skills ;)

Hi folks !

The new Mattermost 4.2 version introduce Interactive Message Buttons feature. It seems to be what we are looking for :)

Hey,

I tried to reimplement this using this new feature but since we still in 4.1, i can't test it for the moment. Do you know if buttons are customizable ?

@rambobinator I'm not sure but I think you can't.

@rambobinator could you make a PR with your proof of concept so other people can contribute to this feature?

@erozqba Sure sorry about that, it was a long time ago and these new interactive message buttons don't really fit our needs for the moment (the message is visible by all).
I won't PR that because it's ugly and i'm sure we can do better but you can check it out following this link:
https://github.com/rambobinator/mattermost-integration-giphy/tree/issue_19