Rich message button that would deep link to an event in the app


#1

There are currently PR’s being reviewed that implement rich message support in both the Android and Core repo’s. Those PR’s implement 3 kinds of buttons:

  1. send a message in the window
  2. show a webview in the window
  3. open a browser

We would like to implement a 4th button that would deep link to events in the app. Two initial use cases come to mind:

  • Click a button that opens the invite users functionality.
  • Click a button that opens a DM with a specific user or another bot.

What do we think is the best implementation for this? Deep linking using urls? Other ideas?

Thanks.


#2

After thinking about it, I think the you may be right that deep linking to sections in the app may be best because it works for both the web client and the mobile clients. So, for instance, if you want to send someone to the account page, you can have them open https://open.rocket.chat/account, which works on the web client and can be deep linked to that section on the mobile clients. See https://medium.com/@ageitgey/everything-you-need-to-know-about-implementing-ios-and-android-mobile-deep-linking-f4348b265b49. The deep links on Android will work without even hitting the network if intent filters are used for sections in the app that can be deep linked to. We will just need to document the sections of the app that can be deep linked to from within rich messages and the corresponding URL that the bot will need to supply as the target to be followed when the button is clicked.

Thoughts?