Add example for retractOtherMessage

This commit is contained in:
JC Brand 2021-06-07 10:10:19 +02:00
parent e3612e8c62
commit 9e4a4ba2ff

View File

@ -754,6 +754,10 @@ const ChatRoomMixin = {
* @method _converse.ChatRoom#retractOtherMessage
* @param { _converse.Message } message - The message which we're retracting.
* @param { string } [reason] - The reason for retracting the message.
* @example
* const room = await api.rooms.get(jid);
* const message = room.messages.findWhere({'body': 'Get rich quick!'});
* room.retractOtherMessage(message, 'spam');
*/
async retractOtherMessage (message, reason) {
const editable = message.get('editable');