api: add private message flag to outgoingMessage
This commit is contained in:
parent
aff6d4b36d
commit
feb8fe9e34
|
@ -369,12 +369,14 @@ class API {
|
|||
* Notify external application (if API is enabled) that message was sent.
|
||||
*
|
||||
* @param {string} message - Message body.
|
||||
* @param {boolean} privateMessage - True if the message was a private message.
|
||||
* @returns {void}
|
||||
*/
|
||||
notifySendingChatMessage(message: string) {
|
||||
notifySendingChatMessage(message: string, privateMessage: boolean) {
|
||||
this._sendEvent({
|
||||
name: 'outgoing-message',
|
||||
message
|
||||
message,
|
||||
privateMessage
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -76,12 +76,12 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
} else {
|
||||
// Sending the message if privacy notice doesn't need to be shown.
|
||||
|
||||
if (typeof APP !== 'undefined') {
|
||||
APP.API.notifySendingChatMessage(action.message);
|
||||
}
|
||||
|
||||
const { privateMessageRecipient } = state['features/chat'];
|
||||
|
||||
if (typeof APP !== 'undefined') {
|
||||
APP.API.notifySendingChatMessage(action.message, Boolean(privateMessageRecipient));
|
||||
}
|
||||
|
||||
if (privateMessageRecipient) {
|
||||
conference.sendPrivateTextMessage(privateMessageRecipient.id, action.message);
|
||||
_persistSentPrivateMessage(store, privateMessageRecipient.id, action.message);
|
||||
|
|
Loading…
Reference in New Issue