Skip to content

[NEW] Rich message text and image buttons#11473

Merged
ggazzo merged 9 commits intoRocketChat:developfrom
ubarsaiyan:buttons
Aug 20, 2018
Merged

[NEW] Rich message text and image buttons#11473
ggazzo merged 9 commits intoRocketChat:developfrom
ubarsaiyan:buttons

Conversation

@ubarsaiyan
Copy link
Copy Markdown
Contributor

@ubarsaiyan ubarsaiyan commented Jul 16, 2018

@ubarsaiyan ubarsaiyan changed the title [WIP] Added text and image buttons [WIP] Rich message text and image buttons Jul 27, 2018
@engelgabriel engelgabriel changed the title [WIP] Rich message text and image buttons Rich message text and image buttons Jul 31, 2018
@engelgabriel engelgabriel requested review from ggazzo and rodrigok July 31, 2018 15:04
@engelgabriel engelgabriel added this to the 0.69.0 milestone Jul 31, 2018
& .text-button {
color: #2c2d30;
min-width: 0;
max-width: 220px;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the indentation here?

@ubarsaiyan ubarsaiyan force-pushed the buttons branch 3 times, most recently from dadd4b0 to 019baec Compare August 15, 2018 21:54
@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

@rodrigok Fixed indentation and rebased to latest develop

@rodrigok
Copy link
Copy Markdown
Member

@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

@rodrigok I have added the new properties, pls check :)

@ggazzo ggazzo merged commit 532009a into RocketChat:develop Aug 20, 2018
@ggazzo ggazzo changed the title Rich message text and image buttons [NEW] Rich message text and image buttons Aug 20, 2018
@sampaiodiego sampaiodiego mentioned this pull request Aug 28, 2018
vickyokrm pushed a commit to assistify/Rocket.Chat that referenced this pull request Oct 2, 2018
* Added text and image buttons

Added image button with msg

Fixed according to updated JSON

Added horizontal buttons support

Fixed indentation

Added text and image buttons

* Added image button with msg

* Fixed according to updated JSON

* Added horizontal buttons support

* fix style logic

* Fixed lint errors and merge conflict

* Remove lint errors

* Added Actions schema to tests
@ghost
Copy link
Copy Markdown

ghost commented Oct 30, 2018

Hi, I use Rocket 0.70.4. How to add this to my server? If necessary reinstall? or copy files into my path instalation?

Thanks!

@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

@ghost
Copy link
Copy Markdown

ghost commented Oct 30, 2018

Hi @ubarsaiyan thanks for your quick response.
Ok on wiki I see how to send JSON but how to load the files .js and .html on my server. Only copy files? what files?

@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

ubarsaiyan commented Oct 30, 2018

@ivanmpk Just normally install the server for the richmessage functionality. This would only enable richmessage messages to be parsed on the client. To send a richmessage you would need to connect a suitable bot. The docs are not yet updated regarding these features and many things are still WIP.

@ghost
Copy link
Copy Markdown

ghost commented Oct 30, 2018

@ubarsaiyan thanks again. How to install rocket with richmessage funciontality?

@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

@ivanmpk Just normal installation as mentioned in the README. The PR was merged in the version 0.69.0

@ghost
Copy link
Copy Markdown

ghost commented Oct 30, 2018

Excellent! Thank you!

@ghost
Copy link
Copy Markdown

ghost commented Oct 31, 2018

Hi, the button_alignment its not working for me. Always the buttons are vertical.
Do you have estimated when test 7 and 8 will be success? I need "msg_in_chat_window: false"

@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

@ivanmpk Are you sending "button_alignment": "horizontal" outside the actions and within the attachments as mentioned in the wiki? If yes, then please open an issue describing it in more detail. There is no progress that I know of regarding the tests 7 and 8.

@ghost
Copy link
Copy Markdown

ghost commented Dec 21, 2018

Hi, I can use this from module rocketchat on ansible?

@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

@ivanmpk I don't know. Maybe ask in #dev channel @ open.rocket.chat?

@buerlyu
Copy link
Copy Markdown

buerlyu commented Jul 4, 2019

@ubarsaiyan Hi, I'm currently working on a contact center demo by using dialogflow based chatbot and the livechat in rocketchat. I try to create a button but can only get a blank message in the livechat.

            let msgData = {
              channel: roomId,
              //rid: roomId,
              text: "text button with msg in chat window",
              attachments: [
                {
                  actions: [
                    {
                      type: "button",
                      text: "Say hello in chat window?",
                      msg: "hello in chat window",
                      msg_in_chat_window: true
                    }
                  ]
                }
              ]
            };
            robot.adapter.customMessage(msgData);

image

@ubarsaiyan
Copy link
Copy Markdown
Contributor Author

@bizzbyster perhaps you can shed some light to @buerlyu on the current state of the rich messages.

@matikucharski
Copy link
Copy Markdown

Hi. Where are rich messages documented? I cannot find a word on it in RC documentation on https://developer.rocket.chat/

@cicada-chen
Copy link
Copy Markdown

where is the doc describe this feature?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rich Messages and Payloads for Buttons and Cards

8 participants