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
99432eeb
Commit
99432eeb
authored
Sep 06, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I think this fixes #1160
Don't included MAM data form if there's nothing to filter
parent
012dd132
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/converse-mam.js
src/converse-mam.js
+4
-2
No files found.
src/converse-mam.js
View file @
99432eeb
...
...
@@ -43,10 +43,11 @@
if
(
_
.
isFunction
(
options
))
{
callback
=
options
;
errback
=
callback
;
options
=
null
;
}
const
queryid
=
_converse
.
connection
.
getUniqueId
();
const
attrs
=
{
'
type
'
:
'
set
'
};
if
(
!
_
.
isUndefined
(
options
)
&&
options
.
groupchat
)
{
if
(
options
&&
options
.
groupchat
)
{
if
(
!
options
[
'
with
'
])
{
// eslint-disable-line dot-notation
throw
new
Error
(
'
You need to specify a "with" value containing
'
+
...
...
@@ -54,8 +55,9 @@
}
attrs
.
to
=
options
[
'
with
'
];
// eslint-disable-line dot-notation
}
const
stanza
=
$iq
(
attrs
).
c
(
'
query
'
,
{
'
xmlns
'
:
Strophe
.
NS
.
MAM
,
'
queryid
'
:
queryid
});
if
(
!
_
.
isUndefined
(
options
)
)
{
if
(
options
)
{
stanza
.
c
(
'
x
'
,
{
'
xmlns
'
:
Strophe
.
NS
.
XFORM
,
'
type
'
:
'
submit
'
})
.
c
(
'
field
'
,
{
'
var
'
:
'
FORM_TYPE
'
,
'
type
'
:
'
hidden
'
})
.
c
(
'
value
'
).
t
(
Strophe
.
NS
.
MAM
).
up
().
up
();
...
...
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