diff --git a/lib/client.js b/lib/client.js index 9ad1da12b..ec5a48199 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1224,6 +1224,24 @@ MatrixClient.prototype.sendHtmlNotice = function(roomId, body, htmlBody, callbac return this.sendMessage(roomId, content, callback); }; +/** + * @param {string} roomId + * @param {string} body + * @param {string} htmlBody + * @param {module:client.callback} callback Optional. + * @return {module:client.Promise} Resolves: TODO + * @return {module:http-api.MatrixError} Rejects: with an error response. + */ +MatrixClient.prototype.sendHtmlEmote = function(roomId, body, htmlBody, callback) { + var content = { + msgtype: "m.emote", + format: "org.matrix.custom.html", + body: body, + formatted_body: htmlBody + }; + return this.sendMessage(roomId, content, callback); +}; + /** * Send a receipt. * @param {Event} event The event being acknowledged