Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Let user select gif from a few samples #19

Open
francisconoriega opened this issue Oct 31, 2016 · 13 comments
Open

Suggestion: Let user select gif from a few samples #19

francisconoriega opened this issue Oct 31, 2016 · 13 comments

Comments

@francisconoriega
Copy link

francisconoriega commented Oct 31, 2016

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]

@Lujeni
Copy link
Member

Lujeni commented Nov 3, 2016

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

@rkopplin
Copy link

rkopplin commented Dec 5, 2016

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

@pichouk
Copy link

pichouk commented Apr 19, 2017

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).

@rambobinator
Copy link

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.

@pichouk
Copy link

pichouk commented Apr 21, 2017

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

@rambobinator
Copy link

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 ...

@pichouk
Copy link

pichouk commented May 26, 2017

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 ;)

@pichouk
Copy link

pichouk commented Sep 22, 2017

Hi folks !

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

@rambobinator
Copy link

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 ?

@pichouk
Copy link

pichouk commented Sep 25, 2017

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

@Lujeni
Copy link
Member

Lujeni commented Oct 4, 2017

@erozqba
Copy link

erozqba commented Jan 18, 2018

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

@rambobinator
Copy link

@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

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

No branches or pull requests

6 participants