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

Attachment.actions not rendering #2174

Closed
nishantt12 opened this issue Jun 8, 2020 · 7 comments
Closed

Attachment.actions not rendering #2174

nishantt12 opened this issue Jun 8, 2020 · 7 comments

Comments

@nishantt12
Copy link

nishantt12 commented Jun 8, 2020

I am trying to render action buttons and send message based on the action click, but these buttons are not getting rendered in the UI, how can I render the Action buttons in our app?

"attachments":[{
  "button_alignment": "horizontal",
  "actions": [
    {
      "type": "button",
      "text": "Daily Nakshatra (English)",
      "msg": "dailyhoroscope english",
      "msg_in_chat_window": true
    },
    {
      "type": "button",
      "text": "Daily Nakshatra (Telugu)",
      "msg": "dailyhoroscope తెలుగు",
      "msg_in_chat_window": true
    },
    {
      "type": "button",
      "text": "Numerology",
      "msg": "Numerology english",
      "msg_in_chat_window": true
    },
    {
      "type": "button",
      "text": "MatchMaking",
      "msg": "Matchmaking english",
      "msg_in_chat_window": true
    }
  ],
  "fields": [
    
  ],
  "attachments": [
    
  ]
}]
@1rV1N-git
Copy link

Hello @diegolmello
Can you fix it?

@diegolmello
Copy link
Member

diegolmello commented Jul 20, 2020

@nishantt12 You should use UIKit for that.
Try /poll app: https://github.com/sampaiodiego/rocket.chat.app-poll
It renders buttons dynamically.

@JargeZ
Copy link

JargeZ commented Nov 11, 2020

Hello
UIKIT is definitely good and I use it
But now there is a problem that it is impossible to implement navigation in bots like hubots, botkits, botpress and others.
I use command buttons for navigation, but they only work on the desktop version
This function in the current implementation is quite enough for the implementation of navigation, for everything else, UIKIT is used in apps

I want to know if it is possible to add support for buttons only for sending a command for easy navigation and consistency with desktop version?
I apologize for the question in a closed issue
But unfortunately there is no way to switch to full use of the application engine for complex bots with integrations of other company services

@djorkaeffalexandre
Copy link
Collaborator

djorkaeffalexandre commented Nov 12, 2020

Hey @JargeZ, can you open an issue describing these things and provide an app that has this behavior? so we can try it here..
Thanks.

@JargeZ
Copy link

JargeZ commented Nov 12, 2020

@djorkaeffalexandre I think there is no need to create a separate issue because the current one is about this problem

The problem is that when sending a message as in the example below to the api address http://localhost:3000/api/v1/chat.sendMessage

{
   "message": {
      "rid": "upmtL9Qhk8rMNSYSp",
      "attachments": [{
            "color": "#ff0000",
            "text": "Test buttons",
            "button_alignment": "horizontal",
            "actions": [
                {
                    "type": "button",
                    "text": "Daily Nakshatra (English)",
                    "msg": "dailyhoroscope english",
                    "msg_in_chat_window": true
                }
            ]
      }]
  }
}

On the desktop version, buttons are displayed:
ex
But not on mobile:
Imgur
the same problem with table fields :'(

Mobile client version: 4.12.0.2140
Server version: 3.7.1

@1rV1N-git
Copy link

@djorkaeffalexandre can you fix this issue?

@bart11064
Copy link

Having the same issue here, and interested in getting it working in the mobile app.

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

No branches or pull requests

6 participants