* VRFS-1868 - bring back P2P messages in the app
This commit is contained in:
parent
0ebdc0ee7c
commit
fc57fd7011
|
|
@ -540,7 +540,10 @@
|
|||
payload = message[messageType],
|
||||
callbacks = server.dispatchTable[message.type];
|
||||
|
||||
if (message.type != context.JK.MessageType.HEARTBEAT_ACK && message.type != context.JK.MessageType.PEER_MESSAGE) {
|
||||
if (message.type == context.JK.MessageType.PEER_MESSAGE) {
|
||||
logger.info("server.onMessage:" + messageType);
|
||||
}
|
||||
else if (message.type != context.JK.MessageType.HEARTBEAT_ACK && message.type != context.JK.MessageType.PEER_MESSAGE) {
|
||||
logger.info("server.onMessage:" + messageType + " payload:" + JSON.stringify(payload));
|
||||
}
|
||||
|
||||
|
|
@ -575,7 +578,10 @@
|
|||
|
||||
var jsMessage = JSON.stringify(message);
|
||||
|
||||
if (message.type != context.JK.MessageType.HEARTBEAT && message.type != context.JK.MessageType.PEER_MESSAGE) {
|
||||
if( message.type == context.JK.MessageType.PEER_MESSAGE) {
|
||||
logger.info("server.send(PEER_MESSAGE)")
|
||||
}
|
||||
else if (message.type != context.JK.MessageType.HEARTBEAT && message.type != context.JK.MessageType.PEER_MESSAGE) {
|
||||
logger.info("server.send(" + jsMessage + ")");
|
||||
}
|
||||
if (server !== undefined && server.socket !== undefined && server.socket.send !== undefined) {
|
||||
|
|
@ -658,8 +664,8 @@
|
|||
context.JK.JamServer = server;
|
||||
|
||||
// Callbacks from jamClient
|
||||
if (context.jamClient !== undefined) {
|
||||
//context.jamClient.SendP2PMessage.connect(server.sendP2PMessage);
|
||||
if (context.jamClient !== undefined && context.jamClient.IsNativeClient()) {
|
||||
context.jamClient.SendP2PMessage.connect(server.sendP2PMessage);
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
|
|
|
|||
|
|
@ -11,9 +11,12 @@
|
|||
context.JK.Banner.showAlert(
|
||||
{ title: "Close JamKazam Application",
|
||||
buttons: [
|
||||
{name: 'Completely Shut Down the App', click: function() {context.jamClient.ShutdownApplication()}},
|
||||
{name: 'Let App Run in Background', click: function() {
|
||||
logger.debug("Let App Run In Background selected")
|
||||
{name: 'COMPLETELY SHUT DOWN THE APP', click: function() {
|
||||
logger.debug("'COMPLETELY SHUT DOWN THE APP' selected")
|
||||
context.jamClient.ShutdownApplication()
|
||||
}},
|
||||
{name: 'LET APP RUN IN BACKGROUND', click: function() {
|
||||
logger.debug("'LET APP RUN IN BACKGROUND' selected")
|
||||
context.jamClient.RegisterQuitCallback("window.JK.ShutdownDialogCallback");
|
||||
context.jamClient.LeaveSessionAndMinimize();
|
||||
context.JK.Banner.hide();
|
||||
|
|
|
|||
Loading…
Reference in New Issue