mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
FS-7840 [verto_communicator] Use chatChannel to send and receive messages from conferences.
This commit is contained in:
parent
288c62576f
commit
0a2eafa306
@ -132,9 +132,11 @@
|
|||||||
* Public methods.
|
* Public methods.
|
||||||
*/
|
*/
|
||||||
$scope.send = function() {
|
$scope.send = function() {
|
||||||
verto.sendMessage($scope.message, function() {
|
// Only conferencing chat is supported for now
|
||||||
$scope.message = CLEAN_MESSAGE;
|
// but still calling method with the conference prefix
|
||||||
});
|
// so we know that explicitly.
|
||||||
|
verto.sendConferenceChat($scope.message);
|
||||||
|
$scope.message = CLEAN_MESSAGE;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Participants moderation.
|
// Participants moderation.
|
||||||
|
@ -335,6 +335,14 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
dialog: dialog,
|
dialog: dialog,
|
||||||
hasVid: storage.data.useVideo,
|
hasVid: storage.data.useVideo,
|
||||||
laData: pvtData,
|
laData: pvtData,
|
||||||
|
chatCallback: function(v, e) {
|
||||||
|
var from = e.data.fromDisplay || e.data.from || "Unknown";
|
||||||
|
var message = e.data.message || "";
|
||||||
|
$rootScope.$emit('chat.newMessage', {
|
||||||
|
from: from,
|
||||||
|
body: message
|
||||||
|
});
|
||||||
|
},
|
||||||
onBroadcast: function(v, conf, message) {
|
onBroadcast: function(v, conf, message) {
|
||||||
console.log('>>> conf.onBroadcast:', arguments);
|
console.log('>>> conf.onBroadcast:', arguments);
|
||||||
if (message.action == 'response') {
|
if (message.action == 'response') {
|
||||||
@ -441,6 +449,10 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
/**
|
||||||
|
* This is not being used for conferencing chat
|
||||||
|
* anymore (see conf.chatCallback for that).
|
||||||
|
*/
|
||||||
case $.verto.enum.message.info:
|
case $.verto.enum.message.info:
|
||||||
var body = params.body;
|
var body = params.body;
|
||||||
var from = params.from_msg_name || params.from;
|
var from = params.from_msg_name || params.from;
|
||||||
@ -750,7 +762,16 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
callback(data.instance, true);
|
callback(data.instance, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
|
* Method is used to send conference chats ONLY.
|
||||||
|
*/
|
||||||
|
sendConferenceChat: function(message) {
|
||||||
|
data.conf.sendChat(message, "message");
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* Method is used to send user2user chats.
|
||||||
|
* VC does not yet support that.
|
||||||
|
*/
|
||||||
sendMessage: function(body, callback) {
|
sendMessage: function(body, callback) {
|
||||||
data.call.message({
|
data.call.message({
|
||||||
to: data.chattingWith,
|
to: data.chattingWith,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user