quickblox 2.17.2-beta.2-logger → 2.17.3-logger
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +330 -201
- package/README.md +2 -2
- package/package.json +1 -2
- package/quickblox.js +19389 -21772
- package/quickblox.min.js +1 -1
- package/src/libs/strophe/strophe.common.js +6657 -0
- package/src/libs/strophe/strophe.esm.js +6649 -0
- package/src/libs/strophe/strophe.umd.js +6862 -0
- package/src/libs/strophe/strophe.umd.min.js +1 -0
- package/src/modules/chat/qbChat.js +131 -11
- package/src/modules/webrtc/qbWebRTCSignalingProcessor.js +2 -1
- package/src/modules/webrtc/qbWebRTCSignalingProvider.js +2 -1
- package/src/qbConfig.js +2 -2
- package/src/qbProxy.js +1 -1
- package/src/qbStrophe.js +2 -6
- package/strophejs-1.4.0/.eslintrc.json +264 -0
- package/strophejs-1.4.0/.gitattributes +1 -0
- package/strophejs-1.4.0/CHANGELOG.md +250 -0
- package/strophejs-1.4.0/LICENSE.txt +19 -0
- package/strophejs-1.4.0/Makefile +92 -0
- package/strophejs-1.4.0/README.md +45 -0
- package/strophejs-1.4.0/RELEASE_CHECKLIST.md +16 -0
- package/strophejs-1.4.0/contrib/discojs/README.txt +42 -0
- package/strophejs-1.4.0/contrib/discojs/css/disco.css +16 -0
- package/strophejs-1.4.0/contrib/discojs/index.html +47 -0
- package/strophejs-1.4.0/contrib/discojs/punjab.tac +18 -0
- package/strophejs-1.4.0/contrib/discojs/scripts/basic.js +102 -0
- package/strophejs-1.4.0/contrib/discojs/scripts/disco.js +60 -0
- package/strophejs-1.4.0/docs.css +797 -0
- package/strophejs-1.4.0/examples/amd.html +21 -0
- package/strophejs-1.4.0/examples/attach/README +37 -0
- package/strophejs-1.4.0/examples/attach/__init__.py +0 -0
- package/strophejs-1.4.0/examples/attach/attacher/__init__.py +0 -0
- package/strophejs-1.4.0/examples/attach/attacher/views.py +18 -0
- package/strophejs-1.4.0/examples/attach/boshclient.py +158 -0
- package/strophejs-1.4.0/examples/attach/manage.py +11 -0
- package/strophejs-1.4.0/examples/attach/settings.py +85 -0
- package/strophejs-1.4.0/examples/attach/templates/attacher/index.html +88 -0
- package/strophejs-1.4.0/examples/attach/urls.py +19 -0
- package/strophejs-1.4.0/examples/basic.html +23 -0
- package/strophejs-1.4.0/examples/basic.js +73 -0
- package/strophejs-1.4.0/examples/echobot.html +25 -0
- package/strophejs-1.4.0/examples/echobot.js +79 -0
- package/strophejs-1.4.0/examples/main.js +59 -0
- package/strophejs-1.4.0/examples/prebind.html +39 -0
- package/strophejs-1.4.0/examples/prebind.js +103 -0
- package/strophejs-1.4.0/examples/restore.html +24 -0
- package/strophejs-1.4.0/examples/restore.js +71 -0
- package/strophejs-1.4.0/package-lock.json +8631 -0
- package/strophejs-1.4.0/package.json +84 -0
- package/strophejs-1.4.0/rollup.config.js +76 -0
- package/strophejs-1.4.0/src/bosh.js +916 -0
- package/strophejs-1.4.0/src/core.js +3530 -0
- package/strophejs-1.4.0/src/md5.js +204 -0
- package/strophejs-1.4.0/src/sha1.js +172 -0
- package/strophejs-1.4.0/src/shared-connection-worker.js +114 -0
- package/strophejs-1.4.0/src/shims.js +123 -0
- package/strophejs-1.4.0/src/strophe.js +14 -0
- package/strophejs-1.4.0/src/utils.js +63 -0
- package/strophejs-1.4.0/src/websocket.js +557 -0
- package/strophejs-1.4.0/src/worker-websocket.js +150 -0
- package/strophejs-1.4.0/tests/index.html +21 -0
- package/strophejs-1.4.0/tests/main.js +49 -0
- package/strophejs-1.4.0/tests/tests.js +929 -0
- package/strophejs-1.6.1/.eslintrc.json +264 -0
- package/strophejs-1.6.1/.gitattributes +1 -0
- package/strophejs-1.6.1/.nvmrc +1 -0
- package/strophejs-1.6.1/CHANGELOG.md +288 -0
- package/strophejs-1.6.1/LICENSE.txt +19 -0
- package/strophejs-1.6.1/Makefile +92 -0
- package/strophejs-1.6.1/README.md +46 -0
- package/strophejs-1.6.1/RELEASE_CHECKLIST.md +18 -0
- package/strophejs-1.6.1/babel.config.json +10 -0
- package/strophejs-1.6.1/contrib/discojs/README.txt +42 -0
- package/strophejs-1.6.1/contrib/discojs/css/disco.css +16 -0
- package/strophejs-1.6.1/contrib/discojs/index.html +47 -0
- package/strophejs-1.6.1/contrib/discojs/punjab.tac +18 -0
- package/strophejs-1.6.1/contrib/discojs/scripts/basic.js +102 -0
- package/strophejs-1.6.1/contrib/discojs/scripts/disco.js +60 -0
- package/strophejs-1.6.1/docs.css +797 -0
- package/strophejs-1.6.1/examples/amd.html +21 -0
- package/strophejs-1.6.1/examples/attach/README +37 -0
- package/strophejs-1.6.1/examples/attach/__init__.py +0 -0
- package/strophejs-1.6.1/examples/attach/attacher/__init__.py +0 -0
- package/strophejs-1.6.1/examples/attach/attacher/views.py +18 -0
- package/strophejs-1.6.1/examples/attach/boshclient.py +158 -0
- package/strophejs-1.6.1/examples/attach/manage.py +11 -0
- package/strophejs-1.6.1/examples/attach/settings.py +85 -0
- package/strophejs-1.6.1/examples/attach/templates/attacher/index.html +88 -0
- package/strophejs-1.6.1/examples/attach/urls.py +19 -0
- package/strophejs-1.6.1/examples/basic.html +23 -0
- package/strophejs-1.6.1/examples/basic.js +73 -0
- package/strophejs-1.6.1/examples/echobot.html +25 -0
- package/strophejs-1.6.1/examples/echobot.js +79 -0
- package/strophejs-1.6.1/examples/main.js +59 -0
- package/strophejs-1.6.1/examples/prebind.html +39 -0
- package/strophejs-1.6.1/examples/prebind.js +103 -0
- package/strophejs-1.6.1/examples/restore.html +24 -0
- package/strophejs-1.6.1/examples/restore.js +71 -0
- package/strophejs-1.6.1/package-lock.json +18461 -0
- package/strophejs-1.6.1/package.json +87 -0
- package/strophejs-1.6.1/rollup.config.js +70 -0
- package/strophejs-1.6.1/src/bosh.js +916 -0
- package/strophejs-1.6.1/src/builder.js +239 -0
- package/strophejs-1.6.1/src/constants.js +155 -0
- package/strophejs-1.6.1/src/core.js +2377 -0
- package/strophejs-1.6.1/src/sasl-anon.js +17 -0
- package/strophejs-1.6.1/src/sasl-external.js +27 -0
- package/strophejs-1.6.1/src/sasl-oauthbearer.js +30 -0
- package/strophejs-1.6.1/src/sasl-plain.js +32 -0
- package/strophejs-1.6.1/src/sasl-sha1.js +24 -0
- package/strophejs-1.6.1/src/sasl-sha256.js +24 -0
- package/strophejs-1.6.1/src/sasl-sha384.js +24 -0
- package/strophejs-1.6.1/src/sasl-sha512.js +24 -0
- package/strophejs-1.6.1/src/sasl-xoauth2.js +27 -0
- package/strophejs-1.6.1/src/sasl.js +143 -0
- package/strophejs-1.6.1/src/scram.js +182 -0
- package/strophejs-1.6.1/src/shared-connection-worker.js +114 -0
- package/strophejs-1.6.1/src/shims.js +122 -0
- package/strophejs-1.6.1/src/strophe.js +15 -0
- package/strophejs-1.6.1/src/utils.js +626 -0
- package/strophejs-1.6.1/src/websocket.js +556 -0
- package/strophejs-1.6.1/src/worker-websocket.js +149 -0
- package/strophejs-1.6.1/tests.js +993 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
config.baseUrl = '../';
|
|
2
|
+
require.config(config);
|
|
3
|
+
if (typeof(require) === 'function') {
|
|
4
|
+
require(["jquery", "strophe", ], function($, wrapper) {
|
|
5
|
+
Strophe = wrapper.Strophe;
|
|
6
|
+
|
|
7
|
+
var BOSH_SERVICE = 'http://bosh.metajack.im:5280/xmpp-httpbind';
|
|
8
|
+
var connection = null;
|
|
9
|
+
|
|
10
|
+
function log(msg) {
|
|
11
|
+
$('#log').append('<div></div>').append(document.createTextNode(msg));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function rawInput(data) {
|
|
15
|
+
log('RECV: ' + data);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function rawOutput(data) {
|
|
19
|
+
log('SENT: ' + data);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function onConnect(status) {
|
|
23
|
+
if (status == Strophe.Status.CONNECTING) {
|
|
24
|
+
log('Strophe is connecting.');
|
|
25
|
+
} else if (status == Strophe.Status.CONNFAIL) {
|
|
26
|
+
log('Strophe failed to connect.');
|
|
27
|
+
$('#connect').get(0).value = 'connect';
|
|
28
|
+
} else if (status == Strophe.Status.DISCONNECTING) {
|
|
29
|
+
log('Strophe is disconnecting.');
|
|
30
|
+
} else if (status == Strophe.Status.DISCONNECTED) {
|
|
31
|
+
log('Strophe is disconnected.');
|
|
32
|
+
$('#connect').get(0).value = 'connect';
|
|
33
|
+
} else if (status == Strophe.Status.CONNECTED) {
|
|
34
|
+
log('Strophe is connected.');
|
|
35
|
+
connection.disconnect();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
$(document).ready(function () {
|
|
40
|
+
connection = new Strophe.Connection(BOSH_SERVICE);
|
|
41
|
+
connection.rawInput = rawInput;
|
|
42
|
+
connection.rawOutput = rawOutput;
|
|
43
|
+
$('#connect').bind('click', function () {
|
|
44
|
+
var button = $('#connect').get(0);
|
|
45
|
+
if (button.value == 'connect') {
|
|
46
|
+
button.value = 'disconnect';
|
|
47
|
+
connection.connect(
|
|
48
|
+
$('#jid').get(0).value,
|
|
49
|
+
$('#pass').get(0).value,
|
|
50
|
+
onConnect
|
|
51
|
+
);
|
|
52
|
+
} else {
|
|
53
|
+
button.value = 'connect';
|
|
54
|
+
connection.disconnect();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<!--
|
|
4
|
+
http-pre-bind example
|
|
5
|
+
|
|
6
|
+
This example works with mod_http_pre_bind found here:
|
|
7
|
+
http://github.com/thepug/Mod-Http-Pre-Bind
|
|
8
|
+
|
|
9
|
+
It expects both /xmpp-httpbind to be proxied and /http-pre-bind
|
|
10
|
+
|
|
11
|
+
If you want to test this out without setting it up, you can use Collecta's
|
|
12
|
+
at http://www.collecta.com/xmpp-httpbind and
|
|
13
|
+
http://www.collecta.com/http-pre-bind
|
|
14
|
+
Use a JID of 'guest.collecta.com' to test.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
<head>
|
|
18
|
+
<title>Strophe.js Pre-Bind Example</title>
|
|
19
|
+
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script>
|
|
20
|
+
<script src='../strophe.js'></script>
|
|
21
|
+
<script src='prebind.js'></script>
|
|
22
|
+
</head>
|
|
23
|
+
|
|
24
|
+
<body>
|
|
25
|
+
<div id='login' style='text-align: center'>
|
|
26
|
+
<form name='cred'>
|
|
27
|
+
<label for='jid'>JID:</label>
|
|
28
|
+
<input type='text' id='jid'>
|
|
29
|
+
<label for='pass'>Password:</label>
|
|
30
|
+
<input type='password' id='pass'>
|
|
31
|
+
<input type='button' id='connect' value='connect'>
|
|
32
|
+
</form>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<hr>
|
|
36
|
+
|
|
37
|
+
<div id='log'></div>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// http-pre-bind example
|
|
2
|
+
// This example works with mod_http_pre_bind found here:
|
|
3
|
+
// http://github.com/thepug/Mod-Http-Pre-Bind
|
|
4
|
+
//
|
|
5
|
+
// It expects both /xmpp-httpbind to be proxied and /http-pre-bind
|
|
6
|
+
//
|
|
7
|
+
// If you want to test this out without setting it up, you can use Collecta's
|
|
8
|
+
// at http://www.collecta.com/xmpp-httpbind and
|
|
9
|
+
// http://www.collecta.com/http-pre-bind
|
|
10
|
+
// Use a JID of 'guest.collecta.com' to test.
|
|
11
|
+
|
|
12
|
+
var BOSH_SERVICE = '/xmpp-httpbind';
|
|
13
|
+
var PREBIND_SERVICE = '/http-pre-bind';
|
|
14
|
+
var connection = null;
|
|
15
|
+
|
|
16
|
+
function log(msg)
|
|
17
|
+
{
|
|
18
|
+
$('#log').append('<div></div>').append(document.createTextNode(msg));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function rawInput(data)
|
|
22
|
+
{
|
|
23
|
+
log('RECV: ' + data);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function rawOutput(data)
|
|
27
|
+
{
|
|
28
|
+
log('SENT: ' + data);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function onConnect(status)
|
|
32
|
+
{
|
|
33
|
+
if (status === Strophe.Status.CONNECTING) {
|
|
34
|
+
log('Strophe is connecting.');
|
|
35
|
+
} else if (status === Strophe.Status.CONNFAIL) {
|
|
36
|
+
log('Strophe failed to connect.');
|
|
37
|
+
$('#connect').get(0).value = 'connect';
|
|
38
|
+
} else if (status === Strophe.Status.DISCONNECTING) {
|
|
39
|
+
log('Strophe is disconnecting.');
|
|
40
|
+
} else if (status === Strophe.Status.DISCONNECTED) {
|
|
41
|
+
log('Strophe is disconnected.');
|
|
42
|
+
$('#connect').get(0).value = 'connect';
|
|
43
|
+
} else if (status === Strophe.Status.CONNECTED) {
|
|
44
|
+
log('Strophe is connected.');
|
|
45
|
+
connection.disconnect();
|
|
46
|
+
} else if (status === Strophe.Status.ATTACHED) {
|
|
47
|
+
log('Strophe is attached.');
|
|
48
|
+
connection.disconnect();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function normal_connect() {
|
|
53
|
+
log('Prebind failed. Connecting normally...');
|
|
54
|
+
|
|
55
|
+
connection = new Strophe.Connection(BOSH_SERVICE);
|
|
56
|
+
connection.rawInput = rawInput;
|
|
57
|
+
connection.rawOutput = rawOutput;
|
|
58
|
+
|
|
59
|
+
connection.connect($('#jid').val(), $('#pass').val(), onConnect);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function attach(data) {
|
|
63
|
+
log('Prebind succeeded. Attaching...');
|
|
64
|
+
|
|
65
|
+
connection = new Strophe.Connection(BOSH_SERVICE);
|
|
66
|
+
connection.rawInput = rawInput;
|
|
67
|
+
connection.rawOutput = rawOutput;
|
|
68
|
+
|
|
69
|
+
var $body = $(data.documentElement);
|
|
70
|
+
connection.attach($body.find('jid').text(),
|
|
71
|
+
$body.attr('sid'),
|
|
72
|
+
parseInt($body.attr('rid'), 10) + 1,
|
|
73
|
+
onConnect);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
$(document).ready(function () {
|
|
77
|
+
$('#connect').bind('click', function () {
|
|
78
|
+
var button = $('#connect').get(0);
|
|
79
|
+
if (button.value == 'connect') {
|
|
80
|
+
button.value = 'disconnect';
|
|
81
|
+
|
|
82
|
+
// attempt prebind
|
|
83
|
+
$.ajax({
|
|
84
|
+
type: 'POST',
|
|
85
|
+
url: PREBIND_SERVICE,
|
|
86
|
+
contentType: 'text/xml',
|
|
87
|
+
processData: false,
|
|
88
|
+
data: $build('body', {
|
|
89
|
+
to: Strophe.getDomainFromJid($('#jid').val()),
|
|
90
|
+
rid: '' + Math.floor(Math.random() * 4294967295),
|
|
91
|
+
wait: '60',
|
|
92
|
+
hold: '1'}).toString(),
|
|
93
|
+
dataType: 'xml',
|
|
94
|
+
error: normal_connect,
|
|
95
|
+
success: attach});
|
|
96
|
+
} else {
|
|
97
|
+
button.value = 'connect';
|
|
98
|
+
if (connection) {
|
|
99
|
+
connection.disconnect();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<!-- Session caching and restoring example. -->
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Strophe.js Persistent Session Example</title>
|
|
7
|
+
<script src="../main.js"></script>
|
|
8
|
+
<script src="../node_modules/requirejs/require.js" data-main="restore.js"></script>
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<div id='login' style='text-align: center'>
|
|
13
|
+
<form name='cred'>
|
|
14
|
+
<label for='jid'>JID:</label>
|
|
15
|
+
<input type='text' id='jid'>
|
|
16
|
+
<label for='pass'>Password:</label>
|
|
17
|
+
<input type='password' id='pass'>
|
|
18
|
+
<input type='button' id='connect' value='connect'>
|
|
19
|
+
</form>
|
|
20
|
+
</div>
|
|
21
|
+
<hr>
|
|
22
|
+
<div id='log'></div>
|
|
23
|
+
</body>
|
|
24
|
+
</html>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
config.baseUrl = '../';
|
|
2
|
+
require.config(config);
|
|
3
|
+
if (typeof(require) === 'function') {
|
|
4
|
+
require(["jquery", "strophe", ], function($, wrapper) {
|
|
5
|
+
Strophe = wrapper.Strophe;
|
|
6
|
+
|
|
7
|
+
var button = document.getElementById("connect");
|
|
8
|
+
button.addEventListener('click', function () {
|
|
9
|
+
if (button.value == 'connect') {
|
|
10
|
+
button.value = 'disconnect';
|
|
11
|
+
connection.connect(
|
|
12
|
+
$('#jid').get(0).value,
|
|
13
|
+
$('#pass').get(0).value,
|
|
14
|
+
onConnect
|
|
15
|
+
);
|
|
16
|
+
} else {
|
|
17
|
+
button.value = 'connect';
|
|
18
|
+
connection.disconnect();
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
$(button).hide();
|
|
22
|
+
|
|
23
|
+
var BOSH_SERVICE = 'https://conversejs.org/http-bind/';
|
|
24
|
+
var connection = null;
|
|
25
|
+
|
|
26
|
+
function log(msg) {
|
|
27
|
+
$('#log').append('<div></div>').append(document.createTextNode(msg));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function rawInput(data) {
|
|
31
|
+
log('RECV: ' + data);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function rawOutput(data) {
|
|
35
|
+
log('SENT: ' + data);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function onConnect(status) {
|
|
39
|
+
if (status == Strophe.Status.CONNECTING) {
|
|
40
|
+
log('Strophe is connecting.');
|
|
41
|
+
} else if (status == Strophe.Status.CONNFAIL) {
|
|
42
|
+
log('Strophe failed to connect.');
|
|
43
|
+
$('#connect').get(0).value = 'connect';
|
|
44
|
+
} else if (status == Strophe.Status.DISCONNECTING) {
|
|
45
|
+
log('Strophe is disconnecting.');
|
|
46
|
+
} else if (status == Strophe.Status.DISCONNECTED) {
|
|
47
|
+
log('Strophe is disconnected.');
|
|
48
|
+
$('#connect').get(0).value = 'connect';
|
|
49
|
+
} else if (status == Strophe.Status.CONNECTED) {
|
|
50
|
+
log('Strophe is connected.');
|
|
51
|
+
} else if (status == Strophe.Status.ATTACHED) {
|
|
52
|
+
log('Strophe is attached.');
|
|
53
|
+
var button = $('#connect').get(0);
|
|
54
|
+
button.value = 'disconnect';
|
|
55
|
+
$(button).show();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
$(document).ready(function () {
|
|
60
|
+
connection = new Strophe.Connection(BOSH_SERVICE, {'keepalive': true});
|
|
61
|
+
connection.rawInput = rawInput;
|
|
62
|
+
connection.rawOutput = rawOutput;
|
|
63
|
+
try {
|
|
64
|
+
connection.restore(null, onConnect);
|
|
65
|
+
} catch(e) {
|
|
66
|
+
if (e.name !== "StropheSessionError") { throw(e); }
|
|
67
|
+
$(button).show();
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|