matrix-org / matrix-org/matrix-spec

Selectable replies to messages sent by bots [canned responses]

Open
#232 5 comments 31 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Client-Server feature
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

Facebook's Messenger bots have a [Quick Replies](https://developers.facebook.com/docs/messenger-platform/send-api-reference/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:

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by determining where Matrix message and client interaction behavior are specified; done would require an agreed protocol design for bot-provided choices and the resulting room message.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.