Ticket #80 (new defect)
Opened 7 months ago
addConnectionPlugin fix
| Reported by: | Liam | Owned by: | Jack |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | strophejs | Version: | |
| Keywords: | plugin | Cc: |
Description
addConnectionPlugin should really create the plugin constructor:
addConnectionPlugin: function(name, ptype)
{
var ctor = function() {};
ctor.prototype = ptype;
Strophe._connectionPlugins[name] = ctor;
}
Plugin instantiation in Connection constructor:
for (var k in Strophe._connectionPlugins) {
if (Strophe._connectionPlugins.hasOwnProperty(k)) {
this[k] = new Strophe._connectionPlugins[k]();
this[k].init(this);
}
}
Note: See
TracTickets for help on using
tickets.