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

RFC: Quick Replies #826

Closed
watadarkstar opened this issue Apr 12, 2018 · 15 comments · Fixed by #1211
Closed

RFC: Quick Replies #826

watadarkstar opened this issue Apr 12, 2018 · 15 comments · Fixed by #1211
Labels
chat-bot related to chat bot pinned

Comments

@watadarkstar
Copy link
Collaborator

watadarkstar commented Apr 12, 2018

Not sure if this library can do suggested responses but it would be very helpful for people who build chat bots.

Something like this:
customer-chat

Facebook calls them quick_replies: https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies

Kik calls them suggested_responses
https://dev.kik.com/#/docs/messaging#suggested-response-keyboard

Telegram calls them inline_keyboard https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating

@watadarkstar watadarkstar changed the title Feature Request: Suggested Responses RFC: Suggested Responses Apr 14, 2018
@watadarkstar
Copy link
Collaborator Author

watadarkstar commented Apr 14, 2018

@xcarpentier @brunocascio @FaridSafi Looking for input on the API for this feature as I'm planning to work on this feature.

The API I'm thinking of is:

Message:

{
  _id: 1,
  text: 'My message',
  "quickReplies":[
      {
        "contentType":"text",
        "title":"Yes",
        "imageUrl":"http://example.com/img/yes.png"
      },
      {
        "contentType":"text",
        "title":"No",
        "imageUrl":"http://example.com/img/no.png"
      }
    ]
}

Component Props:

onQuickReply (Function) - Callback when sending a quick reply
renderQuickReply (Function) - Custom quick reply

onQuickReply(quickReply) {
   if(quickReply.contentType === "text") {
         // send text message
    } else if (quickReply.contentType === "location") {
        // send location
    } else if (quickReply.contentType === "camera") {
        // open camera then send video / image
    }
    // infinite possibilities 
}
...
<GiftedChat onQuickReply={quickReply => this.onQuickReply(quickReply)}>}

@watadarkstar watadarkstar changed the title RFC: Suggested Responses RFC: Quick Replies Apr 14, 2018
@xcarpentier
Copy link
Collaborator

@watadarkstar yes yes 👍
But nothing block to use renderActions or renderAccessory to do it now I guess...

@xcarpentier
Copy link
Collaborator

Or renderMessage

@watadarkstar
Copy link
Collaborator Author

watadarkstar commented Apr 14, 2018

@xcarpentier True I guess you can just use renderMessage to get inline responses, but having an API specific for this would be more convenient.

@pdoggi
Copy link

pdoggi commented May 22, 2018

@watadarkstar Love this idea, how can I help complete this feature?

@watadarkstar
Copy link
Collaborator Author

Hi @pdoggi I ended up doing it in my local project. Do you want to split the work up and write up a PR with the documentation and I can write the code?

@pdoggi
Copy link

pdoggi commented Jun 1, 2018

@watadarkstar I'm sorry I didn't see your message earlier! I would love to work together on this! The best way to reach me is via email and phone. What's a good way to exchange contact information?

I just sent you a message via your website, so you will have my contact. Let me know how I can help!

@husseinraoouf
Copy link

husseinraoouf commented Jul 29, 2018

any news about the Quick replies
Note: I have downloaded your fork of the library with quick replies and it is not usable yet

@watadarkstar
Copy link
Collaborator Author

@husseinraoouf @pdoggi I wish I had more time for this but feel free to take over my fork and complete the feature 😄

@husseinraoouf
Copy link

@watadarkstar No Problem 😄
I will Try To Implement this feature as soon as I could any one can feel free to help

@pdoggi
Copy link

pdoggi commented Aug 2, 2018

hey sorry, I've been super busy as well. 😞

@grinono
Copy link

grinono commented Sep 30, 2018

any updates regarding this?

@OlivierBessi
Copy link

Hello @watadarkstar, @husseinraoouf, @pdoggi - I am interested in this very useful initiative. I was wondering if you got a change to progress the development of this item? Thakn you!

@watadarkstar
Copy link
Collaborator Author

watadarkstar commented Nov 13, 2018

@OlivierBessi @grinono Unfortunately, I don't have the bandwidth to work on this but feel free to submit a PR 😄

EDIT: You can use this PR as a starting point and make it your own: https://github.com/FaridSafi/react-native-gifted-chat/pull/886/files

@Webdev259
Copy link

can i make application for phone call , messages,block number, etc etc auto response application using react native

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chat-bot related to chat bot pinned
Projects
None yet
7 participants