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

[NEW] Rich message text and image buttons #11473

Merged
merged 9 commits into from
Aug 20, 2018
Merged

Conversation

ubarsaiyan
Copy link
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 added this to the 0.69.0 milestone Jul 31, 2018
& .text-button {
color: #2c2d30;
min-width: 0;
max-width: 220px;
Copy link
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
Contributor Author

@rodrigok Fixed indentation and rebased to latest develop

@rodrigok
Copy link
Member

@ubarsaiyan
Copy link
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
@ivanmpk
Copy link

ivanmpk 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
Contributor Author

Hi @ivanmpk
Look at this wiki to send the correct JSON for the rich messages. https://github.com/WideChat/Rocket.Chat.Android/wiki/Phase-1--Rich-Messaging-Acceptance-Test

@ivanmpk
Copy link

ivanmpk 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
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.

@ivanmpk
Copy link

ivanmpk commented Oct 30, 2018

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

@ubarsaiyan
Copy link
Contributor Author

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

@ivanmpk
Copy link

ivanmpk commented Oct 30, 2018

Excellent! Thank you!

@ivanmpk
Copy link

ivanmpk 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
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.

@ivanmpk
Copy link

ivanmpk commented Dec 21, 2018

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

@ubarsaiyan
Copy link
Contributor Author

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

@buerlyu
Copy link

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
Contributor Author

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

@matikucharski
Copy link

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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rich Messages and Payloads for Buttons and Cards
9 participants