Open alex-movila opened 5 years ago
I think this is the intended behavior. Currently, there is no way to disable the button response. Note, the only the button title
should be displayed not the payload
.
Feel free to submit a PR if you like to make this configurable.
I get the payload not the title: /roger
utter_ask_ok_quit:
Indeed, you are right. Looks like the payload
is being send:
https://github.com/scalableminds/chatroom/blob/master/src/ConnectedChatroom.js#L179
It is normal to be sent but not normal to be rendered since for user is gibberish.
I'm seeing this behavior but also one other issue shown i @alex-movila example above. The text "Choose" should show up before the two buttons.
Just realized the text issue is addressed in 0.10.1, PR 112
@rgstephens Just to clarify, the issue is fixed in version 0.10.1? If so, please close the issue. Thanks.
I've updated now to 0.11.0 and the issue with the text not showing is fixed. However, the original problem reported by @alex-movila where the payload
is displayed is still a problem in 0.11.0. As his example shows, the /roger
payload is displayed after the user selects the button.
Hi there, I might have a little workaround for you. I solved this by checking each message for a regex pattern in the Message.js (switch case "text"). Like this:
var dispMsg = message.text;
if (pattern.exec(message.text)) {
dispMsg = replacement;
}
My pattern looks like this: /\/roger/g
. The replacement string can be anything you want it to be...
In the Markdown below just replace source={message.text}
with source={dispMsg}
.
Hi, After pressing button to reply the payload text is shown in the chat window. This happens in Chrome. Can I avoid this?
I use window.chatroom = new window.Chatroom