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

Selectable replies to messages sent by bots [canned responses] #232

Open
jfrederickson opened this issue Mar 3, 2017 · 5 comments · May be fixed by matrix-org/matrix-spec-proposals#4139
Labels
A-Client-Server Issues affecting the CS API feature Suggestion for a significant extension which needs considerable consideration

Comments

@jfrederickson
Copy link

jfrederickson commented Mar 3, 2017

Facebook's Messenger bots have a Quick Replies feature. While this maybe doesn't quite make sense for Matrix (since 1-1 chats aren't really a thing) I think it might be useful to allow bots to provide predefined response buttons, such that clicking/tapping them causes your client to say something in the room.

In the case of Riot/Matrix, it might make sense for these buttons to be attached to the message rather than replacing the keyboard as FB's bots do.

As a more concrete example, I have a chatbot that I use with a few friends that provides a "vote" command. You give it a question and a list of choices, and it opens a vote for users in the room:

<jon> #vote start "What kind of pizza should we get?" "Hawaiian" "Cheese" "Pepperoni" "Taco"
<sibylcrypt> Respond with "vote CHOICE" to participate.
<sibylcrypt> All: A vote about "What kind of pizza should we get?" has been called! --- jon --- Sibyldawson, schwabyl
<jon> #vote Taco
<sibylcrypt> Count --- taco: 1, cheese: 0, pepperoni: 0, hawaiian: 0
<jon> #vote stop
<sibylcrypt> Count --- taco: 1, cheese: 0, pepperoni: 0, hawaiian: 0
<sibylcrypt> All:  The vote about "What kind of pizza should we get?" has ended! --- jon --- Sibyldawson, schwabyl

It'd be nice if our bot could provide these choices as buttons, at which point clicking one would send the appropriate message to the room.

@Crupuk
Copy link

Crupuk commented Jan 19, 2018

It would be nice to have this option. 👍

@richvdh
Copy link
Member

richvdh commented Jan 19, 2018

this is vaguely related to matrix-org/matrix-spec-proposals#441

@richvdh richvdh added the feature Suggestion for a significant extension which needs considerable consideration label Jan 19, 2018
@richvdh richvdh changed the title [Feature request] Selectable replies to messages sent by bots Selectable replies to messages sent by bots [canned responses] Jan 19, 2018
@turt2live turt2live added the A-Client-Server Issues affecting the CS API label Feb 6, 2019
@moritzdietz
Copy link

moritzdietz commented Dec 8, 2020

To add another link to this discussion: this is the design the folks from Mattermost came up with.
https://docs.mattermost.com/developer/interactive-messages.html
Originally suggested/mentioned here: https://matrix.to/#/!YTvKGNlinIzlkMTVRl:matrix.org/$xOB325bXVDzavS7I9HKZUeW_l0BMHxop58dgurz_ROI

@hacker-h
Copy link

hacker-h commented Jul 10, 2021

This feature will be a big step towards an initial competition to telegram bots' fancy interactions, since until now you are limited to emoji reactions and pure messages. Highly looking forward to see these handy buttons in matrix

@svoop
Copy link

svoop commented Jan 10, 2022

Any solution which requires extensions or additions to the API, formats etc will take a long time to see the light of the day. (This issue will soon celebrate its 5th birthday.)

How about a more pragmatic approach using existing HTML support?

try the !help command: <button value="!help">click me</button>

This could render a button which when clicked will prefill the reply with whatever is set in the value attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Client-Server Issues affecting the CS API feature Suggestion for a significant extension which needs considerable consideration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants