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

(feature) add method-callback to signal 'message-action-handler' #306

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on May 3, 2022

  1. (feature) add method-callback to signal 'message-action-handler'

    This enables custom action handlers to make a callback to the default action-handler.
    
    ```
    <template>
        <chat-window
            @message-action-handler="messageActionHandler"
        >
    </template>
    
    <script>
    export default {
      name: 'ChatContainer',
      components: {
        ChatWindow
      },
      methods: {
        messageActionHandler({ action, message, roomId, methodCallback }) {
          if (action.name === 'replyMessageCustom') {
            /*
             * Do something here.
             */
            methodCallback({ action: {name: 'replyMessage'}, message })
          }
        }
      }
    }
    </script>
    ```
    rr-it committed May 3, 2022
    Configuration menu
    Copy the full SHA
    e7e87ec View commit details
    Browse the repository at this point in the history