You've already forked matrix-js-sdk
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user