Type attribute on data forms is mandatory. updates #306
See here: https://github.com/strophe/strophejs-plugins/pull/65
This commit is contained in:
parent
f7c27a08a5
commit
2cc76c3af7
@ -6331,8 +6331,8 @@
|
|||||||
}
|
}
|
||||||
var stanza = $iq(attrs).c('query', {'xmlns':Strophe.NS.MAM, 'queryid':queryid});
|
var stanza = $iq(attrs).c('query', {'xmlns':Strophe.NS.MAM, 'queryid':queryid});
|
||||||
if (typeof options != "undefined") {
|
if (typeof options != "undefined") {
|
||||||
stanza.c('x', {'xmlns':Strophe.NS.XFORM})
|
stanza.c('x', {'xmlns':Strophe.NS.XFORM, 'type': 'submit'})
|
||||||
.c('field', {'var':'FORM_TYPE'})
|
.c('field', {'var':'FORM_TYPE', 'type': 'hidden'})
|
||||||
.c('value').t(Strophe.NS.MAM).up().up();
|
.c('value').t(Strophe.NS.MAM).up().up();
|
||||||
|
|
||||||
if (options['with'] && !options.groupchat) {
|
if (options['with'] && !options.groupchat) {
|
||||||
|
28
spec/mam.js
28
spec/mam.js
@ -52,8 +52,8 @@
|
|||||||
expect(sent_stanza.toString()).toBe(
|
expect(sent_stanza.toString()).toBe(
|
||||||
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
||||||
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
||||||
"<x xmlns='jabber:x:data'>"+
|
"<x xmlns='jabber:x:data' type='submit'>"+
|
||||||
"<field var='FORM_TYPE'>"+
|
"<field var='FORM_TYPE' type='hidden'>"+
|
||||||
"<value>urn:xmpp:mam:0</value>"+
|
"<value>urn:xmpp:mam:0</value>"+
|
||||||
"</field>"+
|
"</field>"+
|
||||||
"<field var='with'>"+
|
"<field var='with'>"+
|
||||||
@ -86,8 +86,8 @@
|
|||||||
expect(sent_stanza.toString()).toBe(
|
expect(sent_stanza.toString()).toBe(
|
||||||
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
||||||
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
||||||
"<x xmlns='jabber:x:data'>"+
|
"<x xmlns='jabber:x:data' type='submit'>"+
|
||||||
"<field var='FORM_TYPE'>"+
|
"<field var='FORM_TYPE' type='hidden'>"+
|
||||||
"<value>urn:xmpp:mam:0</value>"+
|
"<value>urn:xmpp:mam:0</value>"+
|
||||||
"</field>"+
|
"</field>"+
|
||||||
"<field var='start'>"+
|
"<field var='start'>"+
|
||||||
@ -124,8 +124,8 @@
|
|||||||
expect(sent_stanza.toString()).toBe(
|
expect(sent_stanza.toString()).toBe(
|
||||||
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
||||||
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
||||||
"<x xmlns='jabber:x:data'>"+
|
"<x xmlns='jabber:x:data' type='submit'>"+
|
||||||
"<field var='FORM_TYPE'>"+
|
"<field var='FORM_TYPE' type='hidden'>"+
|
||||||
"<value>urn:xmpp:mam:0</value>"+
|
"<value>urn:xmpp:mam:0</value>"+
|
||||||
"</field>"+
|
"</field>"+
|
||||||
"<field var='start'>"+
|
"<field var='start'>"+
|
||||||
@ -153,8 +153,8 @@
|
|||||||
expect(sent_stanza.toString()).toBe(
|
expect(sent_stanza.toString()).toBe(
|
||||||
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
||||||
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
||||||
"<x xmlns='jabber:x:data'>"+
|
"<x xmlns='jabber:x:data' type='submit'>"+
|
||||||
"<field var='FORM_TYPE'>"+
|
"<field var='FORM_TYPE' type='hidden'>"+
|
||||||
"<value>urn:xmpp:mam:0</value>"+
|
"<value>urn:xmpp:mam:0</value>"+
|
||||||
"</field>"+
|
"</field>"+
|
||||||
"<field var='start'>"+
|
"<field var='start'>"+
|
||||||
@ -189,8 +189,8 @@
|
|||||||
expect(sent_stanza.toString()).toBe(
|
expect(sent_stanza.toString()).toBe(
|
||||||
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
||||||
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
||||||
"<x xmlns='jabber:x:data'>"+
|
"<x xmlns='jabber:x:data' type='submit'>"+
|
||||||
"<field var='FORM_TYPE'>"+
|
"<field var='FORM_TYPE' type='hidden'>"+
|
||||||
"<value>urn:xmpp:mam:0</value>"+
|
"<value>urn:xmpp:mam:0</value>"+
|
||||||
"</field>"+
|
"</field>"+
|
||||||
"<field var='start'>"+
|
"<field var='start'>"+
|
||||||
@ -221,8 +221,8 @@
|
|||||||
expect(sent_stanza.toString()).toBe(
|
expect(sent_stanza.toString()).toBe(
|
||||||
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
||||||
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
||||||
"<x xmlns='jabber:x:data'>"+
|
"<x xmlns='jabber:x:data' type='submit'>"+
|
||||||
"<field var='FORM_TYPE'>"+
|
"<field var='FORM_TYPE' type='hidden'>"+
|
||||||
"<value>urn:xmpp:mam:0</value>"+
|
"<value>urn:xmpp:mam:0</value>"+
|
||||||
"</field>"+
|
"</field>"+
|
||||||
"</x>"+
|
"</x>"+
|
||||||
@ -258,8 +258,8 @@
|
|||||||
expect(sent_stanza.toString()).toBe(
|
expect(sent_stanza.toString()).toBe(
|
||||||
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
"<iq type='set' xmlns='jabber:client' id='"+IQ_id+"'>"+
|
||||||
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
"<query xmlns='urn:xmpp:mam:0' queryid='"+queryid+"'>"+
|
||||||
"<x xmlns='jabber:x:data'>"+
|
"<x xmlns='jabber:x:data' type='submit'>"+
|
||||||
"<field var='FORM_TYPE'>"+
|
"<field var='FORM_TYPE' type='hidden'>"+
|
||||||
"<value>urn:xmpp:mam:0</value>"+
|
"<value>urn:xmpp:mam:0</value>"+
|
||||||
"</field>"+
|
"</field>"+
|
||||||
"<field var='with'>"+
|
"<field var='with'>"+
|
||||||
|
Loading…
Reference in New Issue
Block a user