1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-18 05:42:00 +03:00

add sendHtmlEmote

This commit is contained in:
Matthew Hodgson
2015-11-29 01:18:22 +00:00
parent 88d680ef77
commit e3757880ee

View File

@@ -1224,6 +1224,24 @@ MatrixClient.prototype.sendHtmlNotice = function(roomId, body, htmlBody, callbac
return this.sendMessage(roomId, content, callback); 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. * Send a receipt.
* @param {Event} event The event being acknowledged * @param {Event} event The event being acknowledged