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
561c138e
Commit
561c138e
authored
Jul 28, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix. Allow multiple MAM queries to be made simultaneously.
parent
e28aba5a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
docs/CHANGES.md
docs/CHANGES.md
+1
-0
spec/mam.js
spec/mam.js
+1
-1
src/converse-mam.js
src/converse-mam.js
+8
-9
No files found.
docs/CHANGES.md
View file @
561c138e
...
...
@@ -9,6 +9,7 @@
list. [jcbrand]
-
#645 When accepting a contact request, the contact didn't appear in the
pending contacts group. [jcbrand]
-
Bugfix: allow multiple MAM queries to be made simultaneously. [jcbrand]
## 1.0.4 (2016-07-26)
...
...
spec/mam.js
View file @
561c138e
...
...
@@ -348,7 +348,7 @@
* </fin>
* </message>
*/
stanza
=
$msg
().
c
(
'
fin
'
,
{
'
xmlns
'
:
'
urn:xmpp:mam:0
'
,
'
complete
'
:
'
true
'
})
stanza
=
$msg
().
c
(
'
fin
'
,
{
'
xmlns
'
:
'
urn:xmpp:mam:0
'
,
'
queryid
'
:
queryid
,
'
complete
'
:
'
true
'
})
.
c
(
'
set
'
,
{
'
xmlns
'
:
'
http://jabber.org/protocol/rsm
'
})
.
c
(
'
first
'
,
{
'
index
'
:
'
0
'
}).
t
(
'
23452-4534-1
'
).
up
()
.
c
(
'
last
'
).
t
(
'
390-2342-22
'
).
up
()
...
...
src/converse-mam.js
View file @
561c138e
...
...
@@ -203,11 +203,12 @@
stanza
.
cnode
(
new
Strophe
.
RSM
(
options
).
toXML
());
}
}
converse
.
connection
.
addHandler
(
function
(
message
)
{
var
$msg
=
$
(
message
),
$fin
,
rsm
;
if
(
typeof
callback
===
"
function
"
)
{
$fin
=
$msg
.
find
(
'
fin[xmlns="
'
+
Strophe
.
NS
.
MAM
+
'
"]
'
);
if
(
$fin
.
length
)
{
if
(
typeof
callback
===
"
function
"
)
{
converse
.
connection
.
addHandler
(
function
(
message
)
{
var
$msg
=
$
(
message
),
rsm
,
$fin
=
$msg
.
find
(
'
fin[xmlns="
'
+
Strophe
.
NS
.
MAM
+
'
"]
'
);
if
(
$fin
.
length
&&
$fin
.
attr
(
'
queryid
'
)
===
queryid
)
{
rsm
=
new
Strophe
.
RSM
({
xml
:
$fin
.
find
(
'
set
'
)[
0
]});
_
.
extend
(
rsm
,
_
.
pick
(
options
,
[
'
max
'
]));
_
.
extend
(
rsm
,
_
.
pick
(
options
,
MAM_ATTRIBUTES
));
...
...
@@ -217,10 +218,8 @@
messages
.
push
(
message
);
}
return
true
;
}
else
{
return
false
;
// There's no callback, so no use in continuing this handler.
}
},
Strophe
.
NS
.
MAM
);
},
Strophe
.
NS
.
MAM
);
}
converse
.
connection
.
sendIQ
(
stanza
,
null
,
errback
,
converse
.
message_archiving_timeout
);
};
...
...
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