~samwhited/xmpp

0a6cac11f7bdf28835f3f66fbf4f613056b2de75 — Sam Whited 3 years ago 12826d6
all: change name of stream namespace constant
2 files changed, 11 insertions(+), 11 deletions(-)

M internal/ns/ns.go
M stream/error.go
M internal/ns/ns.go => internal/ns/ns.go +10 -10
@@ 8,14 8,14 @@ package ns // import "mellium.im/xmpp/internal/ns"

// List of commonly used namespaces.
const (
	Bind     = "urn:ietf:params:xml:ns:xmpp-bind"
	Client   = "jabber:client"
	SASL     = "urn:ietf:params:xml:ns:xmpp-sasl"
	Server   = "jabber:server"
	Stanza   = "urn:ietf:params:xml:ns:xmpp-stanzas"
	StartTLS = "urn:ietf:params:xml:ns:xmpp-tls"
	Stream   = "http://etherx.jabber.org/streams"
	Streams  = "urn:ietf:params:xml:ns:xmpp-streams"
	WS       = "urn:ietf:params:xml:ns:xmpp-framing"
	XML      = "http://www.w3.org/XML/1998/namespace"
	Bind       = "urn:ietf:params:xml:ns:xmpp-bind"
	Client     = "jabber:client"
	SASL       = "urn:ietf:params:xml:ns:xmpp-sasl"
	Server     = "jabber:server"
	Stanza     = "urn:ietf:params:xml:ns:xmpp-stanzas"
	StartTLS   = "urn:ietf:params:xml:ns:xmpp-tls"
	Stream     = "http://etherx.jabber.org/streams"
	XMPPStream = "urn:ietf:params:xml:ns:xmpp-streams"
	WS         = "urn:ietf:params:xml:ns:xmpp-framing"
	XML        = "http://www.w3.org/XML/1998/namespace"
)

M stream/error.go => stream/error.go +1 -1
@@ 237,7 237,7 @@ func (s Error) WriteXML(w xmlstream.TokenWriter, _ xml.StartElement) error {
// TokenReader returns a new xmlstream.TokenReader that returns an encoding of
// the error.
func (s Error) TokenReader(payload xmlstream.TokenReader) xmlstream.TokenReader {
	inner := xmlstream.Wrap(s.innerXML, xml.StartElement{Name: xml.Name{Local: s.Err, Space: ns.Streams}})
	inner := xmlstream.Wrap(s.innerXML, xml.StartElement{Name: xml.Name{Local: s.Err, Space: ns.XMPPStream}})
	if payload != nil {
		inner = xmlstream.MultiReader(
			inner,