~samwhited/xmpp

all: update changelog for v0.15.0

Signed-off-by: Sam Whited <sam@samwhited.com>
all: move stanza wrapping to methods

Previously to wrap a payload in a stanza you would use the functions
WrapIQ, WrapMessage, and WrapPresence. Each of these took their
respective stanza types and a payload.
These have been moved to Wrap methods on the various stanza types that
take a payload to make them easier to use in handlers where you already
have the stanza.
The down side is that these methods now exist on types that embed a
stanza, which may be confusing since the payload will be ignored and
only the stanza will be used.

Signed-off-by: Sam Whited <sam@samwhited.com>
design: update stanza mux

Update the mux proposal to solve the last remaining questions, and
clarify that the token stream will always contain the entire stanzas
stream, including the original start element.

Signed-off-by: Sam Whited <sam@samwhited.com>
mux: pass stanza to handlers

For each child element that triggers a message or presence handler pass
a buffered copy of the entire token stream to the handler so that it can
easily decode the entire stanza.

See https://mellium.im/design/25_stanzamux
mux: implement better stanza handling

See https://mellium.im/design/25_stanzamux

Signed-off-by: Sam Whited <sam@samwhited.com>
stanza: support tokens/stanza conversion

Signed-off-by: Sam Whited <sam@samwhited.com>
examples/msgrepl: gitignore msgrepl binary

Signed-off-by: Sam Whited <sam@samwhited.com>
all: be strict about namespace validation

When decoding stanzas, be more strict about verifying the namespace.
Previously stanzas would have an empty namespace, but the session should
always setup the default namespace correctly now.

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/xmpptest: set default stream namespace

Previously test sessions did not have a default namespace. Setting the
namespace ensures that IQ and Stanza name checks won't break in the
future when we start being more strict about validating namespaces.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: fix error reporting unexpected token type

Previously the error reporting an unexpected token would always claim
that the token was a start token (which is the expected type). Instead,
report the unexpected token's type.

Signed-off-by: Sam Whited <sam@samwhited.com>
all: mention Go license in readme

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: remove duplicate helper function

The recent updates to attr.Get allow us to use it in place of the getID
helper function which returned the value and index of the "id" attribute
specifically.

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/attr: update Get to return the index

Previously only the value was returned, however, if we are trying to
conditionally update an attribute it would be helpful to know where in
the slice of attributes the result was found.

Signed-off-by: Sam Whited <sam@samwhited.com>
all: fix broken link in the readme

Signed-off-by: Sam Whited <sam@samwhited.com>
docs: use single directory for documentation

Signed-off-by: Sam Whited <sam@samwhited.com>
.builds: add DCO check

Using a developer certificate of origin gives us a simple way to ask
people to assert that they have the rights to submit their code without
requiring cumbersome CLAs.

Signed-off-by: Sam Whited <sam@samwhited.com>
xtime: add new package

The xtime package contains functionality relating to time including
implementations of XEP-0202: Entity Time and XEP-0082: XMPP Date and
Time Profiles.

Signed-off-by: Sam Whited <sam@samwhited.com>
ping: add ability to easily send and handle pings

Signed-off-by: Sam Whited <sam@samwhited.com>
mux: let ServeMux register stanza handlers

Previously the multiplexer was too generalized and only handled top
level elements. To handle children different types of alternative muxers
had to be registered. Instead, move all the functionality for matching
against different stanza types into the main muxer and separate the
stanza handlers from the generic top level handlers.

Fixes #25

Signed-off-by: Sam Whited <sam@samwhited.com>
.builds: error if golint fails

Signed-off-by: Sam Whited <sam@samwhited.com>
.builds: validate docs and import comments

Signed-off-by: Sam Whited <sam@samwhited.com>
Next