Message Type Compatibility for Cross-Platform xBot

This document details the types of messages supported by each platform to ensure compatibility and enhance user experience in xBOT application

Supported Message Types by Platform

  1. Text Messages (Editor and view Message)

  2. Adaptive Card (View message)

  3. HTML Format (Editor and view Message)

  4. Markdown (Editor and view Message)


Platform-Specific Message Support

Platform
Text Messages
Adaptive Card
HTML Format
Markdown

ZALO

Microsoft Teams

EMAIL

Microsoft Webchat SDK

Facebook


Sample Types of Supported Messages

  1. Text Messages (1):

    • Example: "Hello, how can I assist you today?"

    • Usage: Basic, plain text communication for all platforms.

  2. Adaptive Card (2):

    • Example:

      {
        "type": "AdaptiveCard",
        "version": "1.0",
        "body": [
          {
            "type": "TextBlock",
            "text": "Welcome to the chat!",
            "weight": "bolder",
            "size": "medium"
          },
          {
            "type": "Image",
            "url": "https://example.com/welcome.png"
          }
        ],
        "actions": [
          {
            "type": "Action.OpenUrl",
            "title": "Learn More",
            "url": "https://example.com"
          }
        ]
      }
    • Usage: Rich, interactive messages for Microsoft Teams.

    UI that displays in message list
  3. HTML Format (3):

    • Example:

      <p><strong>Important Update:</strong> Please review the attached document.</p>
      <a href="https://example.com/document.pdf">Download Document</a>
    • Usage: Styled text

    UI that displays in message list

Markdown Format (4):

  • Example:

  • Usage: Simple text formatting

UI that displays in message list

Editor Behavior for Different Message Types

  1. Text Messages (1):

    • Editor: Simple editor with basic input functionality.

    • Features: No advanced formatting tools, plain text input.

    Simple editor
  2. HTML Format (3):

    • Editor: Rich text editor with a toolbar.

    • Features: Supports various HTML elements, styling options, and media embedding.

    Editor that supports HTML default mode

    Editor that supports HTML toolbar mode
  3. Markdown Format (4):

    • Editor: Rich text editor with a toolbar.

    • Features: Basic formatting tools for bold, italic, underline, strike, header 1, header 2, ordered list, unordered list, blockquote, code-block, link, image, and remove format.

    Editor that supports HTML default mode
    Editor that supports HTML toolbar mode

Implementation Notes

  • Text Messages (1): The most basic form of communication, universally supported across all platforms. In the simple editor (serving only text messages), any formatted text pasted will remove all formatting, resulting in plain text.

  • HTML Format Messages (3): Allows for complex, styled content within messages, supported by Microsoft Teams and EMAIL. In the rich editor (serving HTML format), pasted text will retain its formatting.

  • Markdown Format Messages (4): Supported by Microsoft Webchat SDK client, and Facebook, providing simplified text formatting using markdown syntax. In the rich editor (serving Markdown format), pasted text will retain its formatting.

  • Image Paste Behavior: Inline images pasted into the editor must be less than 500KB for both HTML and Markdown formats to ensure efficient loading and storage.


Conclusion

This structured support for various message types across different platforms ensures that our chat application remains versatile and user-friendly. However, the initial claim of markdown format message support for all platforms needs revision based on the actual capabilities and limitations of each platform. By adhering to these guidelines, we can deliver a consistent and high-quality messaging experience to our users regardless of the platform they are using.

Last updated