<commit_before>/* XEP-0313: Message Archive Management
 * Copyright (C) 2012 <NAME>
 *
 * This file is MIT/X11 licensed. Please see the
 * LICENSE.txt file in the source package for more information.
 * 
 * Modified by: <NAME> (github.com/Destreyf/)
 * Updated to support v0.3 of the XMPP XEP-0313 standard
 * http://xmpp.org/extensions/xep-0313.html
 *
 */
(function(){
'use strict';

Strophe.addConnectionPlugin('mam', {
    _c: null,
    _p: [ 'with', 'start', 'end' ],
    init: function (conn) {
        this._c = conn;
        Strophe.addNamespace('MAM', 'urn:xmpp:mam:0');
    },
    query: function (jid, options) {
        var _p = this._p;
        var attr = {
            type:'set',
            id:jid
        };
        var mamAttr = {xmlns: Strophe.NS.MAM};
        if (!!options['queryid']) {
            mamAttr.queryid = options['queryid'];
            delete options['queryid'];
        }
        var iq = $iq(attr).c('query', mamAttr).c('x',{xmlns:'jabber:x:data'});

        iq.c('field',{var:'FORM_TYPE'}).c('value').t('urn:xmpp:mam:0').up().up();
        var i;
        for (i = 0; i < this._p.length; i++) {<commit_msg>Type attribute on data forms is mandatory<commit_after>/* XEP-0313: Message Archive Management
 * Copyright (C) 2012 <NAME>
 *
 * This file is MIT/X11 licensed. Please see the
 * LICENSE.txt file in the source package for more information.
 * 
 * Modified by: <NAME> (github.com/Destreyf/)
 * Updated to support v0.3 of the XMPP XEP-0313 standard
 * http://xmpp.org/extensions/xep-0313.html
 *
 */
(function(){
'use strict';

Strophe.addConnectionPlugin('mam', {
    _c: null,
    _p: [ 'with', 'start', 'end' ],
    init: function (conn) {
        this._c = conn;
        Strophe.addNamespace('MAM', 'urn:xmpp:mam:0');
    },
    query: function (jid, options) {
        var _p = this._p;
        var attr = {
            type:'set',
            id:jid
        };
        var mamAttr = {xmlns: Strophe.NS.MAM};
        if (!!options['queryid']) {
            mamAttr.queryid = options['queryid'];
            delete options['queryid'];
        }
        var iq = $iq(attr).c('query', mamAttr).c('x',{xmlns:'jabber:x:data', type:'submit'});

        iq.c('field',{var:'FORM_TYPE'}).c('value').t('urn:xmpp:mam:0').up().up();
        var i;
        for (i = 0; i < this._p.length; i++) {
{'fraction_non_alphanumeric': 0.17791147400085947, 'fraction_numerical': 0.019767941555651054, 'mean_word_length': 2.4746268656716417, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4085085', 'n_tokens_mistral': 857, 'n_tokens_neox': 810, 'n_words': 189}