stanza.attr is both a map or key=values and an array of keys.
Does any code depend on the array or keys? Does the array need to be
present along with the map when persisting the stanza?
Note: xmlns attributes are not added to the array
Example vCard:
return {
[1] = "\n",
[2] = {
[1] = "Waqas Hussain",
["attr"] = {
["xmlns"] = "vcard-temp",
},
["name"] = "FN",
},
[3] = "\n",
["attr"] = {
[1] = "version",
[2] = "prodid",
["version"] = "2.0",
["prodid"] = "-//HandGen//NONSGML vGen v1.0//EN",
["xmlns"] = "vcard-temp",
},
["name"] = "vCard",
}
MattJ
on
Let's remove this, as you say. I have written no code that depends on it.
Waqas
on
And no code should depend on it. Attributes are unordered and unique by definition,
so an array doesn't make sense.
stanza.attr is both a map or key=values and an array of keys. Does any code depend on the array or keys? Does the array need to be present along with the map when persisting the stanza? Note: xmlns attributes are not added to the array Example vCard: return { [1] = "\n", [2] = { [1] = "Waqas Hussain", ["attr"] = { ["xmlns"] = "vcard-temp", }, ["name"] = "FN", }, [3] = "\n", ["attr"] = { [1] = "version", [2] = "prodid", ["version"] = "2.0", ["prodid"] = "-//HandGen//NONSGML vGen v1.0//EN", ["xmlns"] = "vcard-temp", }, ["name"] = "vCard", }
Let's remove this, as you say. I have written no code that depends on it.
And no code should depend on it. Attributes are unordered and unique by definition, so an array doesn't make sense.
Fixed: http://prosody.im/source/hg/?rev/6f653b8beac9
Changes