-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(server-commands): send chat message #105
feat(server-commands): send chat message #105
Conversation
Adds the `sendPublicChatMessage` server command which allows plugins to send a message in the public chat. When a plugin calls this method, its name is registered to the message metadata so that it is possible to later identify which plugin sent the given message. Additionaly plugins may send a custom metadata to be saved in the messages metadata.
Adds metadata to the loaded chat message type, allowing plugins to identify the message owner and custom metadata sent via the `sendPublicChatMessage` server command. This is essential for plugins to custom-render their own messages based on the metadata.
Implements the `sendCustomPublicChatMessage` command that sends a custom chat message in the public chat which is not rendered by the BBB client itself. This type of message is meant to be custom-rendered by plugins.
This commit adds the `sendCustomPublicChatMessage` server command to the chat server command sample.
Adds a logic to track which messages were already styled. Also adds missing semicolon and comma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks very good, just that typo.
By the way, one comment that is worth mentioning, after this PR is merged of course, we should add a server-command to send message to private chats. And also, perhaps in the same next PR, add a data-consumption hook to look out for private chat creations. Tell me what you think of this idea!
Co-authored-by: Guilherme Pereira Leme <[email protected]>
I think it's a good idea! Adding the server command for sending private chat messages should be trivial once this PR is merged, because the chat server commands are all translated to a generic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
published in version 0.0.56 |
What does this PR do?
This PR adds the
sendPublicChatMessage
andsendCustomPublicChatMessage
server commands which allows plugins to send a message in the public chat. When a plugin calls any of this methods, its name is registered to the message metadata so that it is possible to later identify which plugin sent the given message. Additionally plugins may send a custom metadata to be saved in the messages metadata.sendPublicChatMessage
: sends a message in the public chat which is displayed as sent by the client usersendCustomPublicChatMessage
: sends a custom message in the public chat which is not rendered by the BBB client. This message is meant to be custom-rendered by plugins.Lastly, this PR adds a sample application for this feature:
More
Depends on: