Trigger sendMessage
event
This commit is contained in:
parent
6cd2fac33c
commit
2963830916
@ -997,6 +997,16 @@ converse.plugins.add('converse-chat', {
|
|||||||
message = await this.createMessage(attrs);
|
message = await this.createMessage(attrs);
|
||||||
}
|
}
|
||||||
api.send(this.createMessageStanza(message));
|
api.send(this.createMessageStanza(message));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Triggered when a message is being sent out
|
||||||
|
* @event _converse#sendMessage
|
||||||
|
* @type { Object }
|
||||||
|
* @property { Object } data
|
||||||
|
* @property { (_converse.ChatBox | _converse.ChatRoom) } data.chatbox
|
||||||
|
* @property { (_converse.Message | _converse.ChatRoomMessage } data.message
|
||||||
|
*/
|
||||||
|
api.trigger('sendMessage', {'chatbox': this, message});
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user