Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
1261a252
Commit
1261a252
authored
Jul 11, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Strophe.RSM for result set management.
parent
b77d76b3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
18 deletions
+27
-18
converse.js
converse.js
+11
-6
main.js
main.js
+6
-6
spec/mam.js
spec/mam.js
+2
-2
src/deps-full.js
src/deps-full.js
+2
-1
src/deps-no-otr.js
src/deps-no-otr.js
+2
-1
src/deps-website-no-otr.js
src/deps-website-no-otr.js
+2
-1
src/deps-website.js
src/deps-website.js
+2
-1
No files found.
converse.js
View file @
1261a252
...
...
@@ -118,6 +118,11 @@
}
};
// Global constants
// XEP-0059 Result Set Management
var
RSM_ATTRIBUTES
=
[
'
max
'
,
'
first
'
,
'
last
'
,
'
after
'
,
'
before
'
,
'
index
'
,
'
count
'
];
var
STATUS_WEIGHTS
=
{
'
offline
'
:
6
,
'
unavailable
'
:
5
,
...
...
@@ -6138,14 +6143,14 @@
}
});
stanza
.
up
();
if
(
options
.
limit
)
{
stanza
.
c
(
'
set
'
,
{
'
xmlns
'
:
Strophe
.
NS
.
RSM
}).
c
(
'
max
'
).
t
(
options
.
limit
).
up
();
}
if
(
options
.
after
)
{
stanza
.
c
(
'
after
'
).
t
(
options
.
after
).
up
();
if
(
_
.
intersection
(
RSM_ATTRIBUTES
,
_
.
keys
(
options
)).
length
)
{
stanza
.
cnode
(
new
Strophe
.
RSM
(
options
).
toXML
());
}
}
converse
.
connection
.
sendIQ
(
stanza
,
callback
,
errback
);
converse
.
connection
.
sendIQ
(
stanza
,
function
(
iq
)
{
var
rsm
=
new
Strophe
.
RSM
({
xml
:
iq
.
getElementsByTagName
(
'
set
'
)[
0
]});
return
_
.
bind
(
callback
,
this
,
arguments
)(
rsm
);
},
errback
);
}
},
'
rooms
'
:
{
...
...
main.js
View file @
1261a252
...
...
@@ -27,17 +27,18 @@ require.config({
"
jquery.browser
"
:
"
components/jquery.browser/dist/jquery.browser
"
,
"
jquery.easing
"
:
"
components/jquery-easing-original/index
"
,
// XXX: Only required for https://conversejs.org website
"
moment
"
:
"
components/momentjs/moment
"
,
"
strophe
"
:
"
components/strophejs/src/wrapper
"
,
"
strophe-base64
"
:
"
components/strophejs/src/base64
"
,
"
strophe-bosh
"
:
"
components/strophejs/src/bosh
"
,
"
strophe-core
"
:
"
components/strophejs/src/core
"
,
"
strophe
"
:
"
components/strophejs/src/wrapper
"
,
"
strophe-md5
"
:
"
components/strophejs/src/md5
"
,
"
strophe-polyfill
"
:
"
components/strophejs/src/polyfills
"
,
"
strophe-sha1
"
:
"
components/strophejs/src/sha1
"
,
"
strophe-websocket
"
:
"
components/strophejs/src/websocket
"
,
"
strophe-polyfill
"
:
"
components/strophejs/src/polyfills
"
,
"
strophe.disco
"
:
"
components/strophejs-plugins/disco/strophe.disco
"
,
"
strophe.vcard
"
:
"
src/strophe.vcard
"
,
"
strophe.ping
"
:
"
src/strophe.ping
"
,
"
strophe.rsm
"
:
"
components/strophejs-plugins/rsm/strophe.rsm
"
,
"
strophe.vcard
"
:
"
src/strophe.vcard
"
,
"
text
"
:
'
components/requirejs-text/text
'
,
"
tpl
"
:
'
components/requirejs-tpl-jcbrand/tpl
'
,
"
typeahead
"
:
"
components/typeahead.js/index
"
,
...
...
@@ -185,10 +186,9 @@ require.config({
'
crypto.sha1
'
:
{
deps
:
[
'
crypto.core
'
]
},
'
crypto.sha256
'
:
{
deps
:
[
'
crypto.core
'
]
},
'
bigint
'
:
{
deps
:
[
'
crypto
'
]
},
'
strophe.
disco
'
:
{
deps
:
[
'
strophe
'
]
},
'
strophe.
ping
'
:
{
deps
:
[
'
strophe
'
]
},
'
strophe.register
'
:
{
deps
:
[
'
strophe
'
]
},
'
strophe.vcard
'
:
{
deps
:
[
'
strophe
'
]
},
'
strophe.ping
'
:
{
deps
:
[
'
strophe
'
]
}
'
strophe.vcard
'
:
{
deps
:
[
'
strophe
'
]
}
}
});
...
...
spec/mam.js
View file @
1261a252
...
...
@@ -161,7 +161,7 @@
Date
.
prototype
.
getTimezoneOffset
=
function
()
{
return
-
120
;
};
converse_api
.
archive
.
query
({
'
start
'
:
'
2010-06-07T00:00:00Z
'
,
'
limit
'
:
10
});
converse_api
.
archive
.
query
({
'
start
'
:
'
2010-06-07T00:00:00Z
'
,
'
max
'
:
10
});
var
queryid
=
$
(
sent_stanza
.
toString
()).
find
(
'
query
'
).
attr
(
'
queryid
'
);
expect
(
sent_stanza
.
toString
()).
toBe
(
"
<iq type='set' xmlns='jabber:client' id='
"
+
IQ_id
+
"
'>
"
+
...
...
@@ -202,7 +202,7 @@
converse_api
.
archive
.
query
({
'
start
'
:
'
2010-06-07T00:00:00Z
'
,
'
after
'
:
'
09af3-cc343-b409f
'
,
'
limit
'
:
10
'
max
'
:
10
});
var
queryid
=
$
(
sent_stanza
.
toString
()).
find
(
'
query
'
).
attr
(
'
queryid
'
);
expect
(
sent_stanza
.
toString
()).
toBe
(
...
...
src/deps-full.js
View file @
1261a252
...
...
@@ -4,9 +4,10 @@ define("converse-dependencies", [
"
otr
"
,
"
moment_with_locales
"
,
"
strophe
"
,
"
strophe.vcard
"
,
"
strophe.disco
"
,
"
strophe.ping
"
,
"
strophe.rsm
"
,
"
strophe.vcard
"
,
"
backbone.browserStorage
"
,
"
backbone.overview
"
,
"
jquery.browser
"
,
...
...
src/deps-no-otr.js
View file @
1261a252
...
...
@@ -3,9 +3,10 @@ define("converse-dependencies", [
"
utils
"
,
"
moment_with_locales
"
,
"
strophe
"
,
"
strophe.vcard
"
,
"
strophe.disco
"
,
"
strophe.ping
"
,
"
strophe.rsm
"
,
"
strophe.vcard
"
,
"
backbone.browserStorage
"
,
"
backbone.overview
"
,
"
jquery.browser
"
,
...
...
src/deps-website-no-otr.js
View file @
1261a252
...
...
@@ -3,9 +3,10 @@ define("converse-dependencies", [
"
utils
"
,
"
moment_with_locales
"
,
"
strophe
"
,
"
strophe.vcard
"
,
"
strophe.disco
"
,
"
strophe.ping
"
,
"
strophe.rsm
"
,
"
strophe.vcard
"
,
"
bootstrapJS
"
,
// XXX: Can be removed, only for https://conversejs.org
"
backbone.browserStorage
"
,
"
backbone.overview
"
,
...
...
src/deps-website.js
View file @
1261a252
...
...
@@ -5,9 +5,10 @@ define("converse-dependencies", [
"
otr
"
,
"
moment_with_locales
"
,
"
strophe
"
,
"
strophe.vcard
"
,
"
strophe.disco
"
,
"
strophe.ping
"
,
"
strophe.rsm
"
,
"
strophe.vcard
"
,
"
bootstrapJS
"
,
// XXX: Only for https://conversejs.org
"
backbone.browserStorage
"
,
"
backbone.overview
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment