~samwhited/xmpp

xmpptest: add a client/server test mechanism

Hopefully this will allow us to get rid of the various race conditions
in the IQ tests.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: add RW mutex around session state

This fixes a race condition that could result in writes to a closed
stream, for example.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: add EncodeIQ and EncodeIQElement methods

This makes sending IQs and waiting on a reply possible with the struct
based API. Previously this was only possible if you did not want the
library to handle waiting on a reply for you.

Fixes #33

Signed-off-by: Sam Whited <sam@samwhited.com>
ping: temporarily remove Ejabberd integration test

See https://mellium.im/issue/68

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: fix bind bug when using ejabberd

Bind was previously rendering an empty <jid/> in every bind request that
was ignored by most servers, but is technically not part of the bind
request and would break Ejabberd.

Signed-off-by: Sam Whited <sam@samwhited.com>
ping: add integration tests

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

Update the integration testing proposal to mention that the new API is
not covered by the compatibility promise since it's in the internal/
tree.

Signed-off-by: Sam Whited <sam@samwhited.com>
.builds: run integration tests

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration/ejabberd: new package

The ejabberd package lets you configure and spin up an instance of the
Ejabberd XMPP server (https://www.ejabberd.im/) for use in integration
tests.

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration/prosody: new package

The prosody package lets you configure and spin up an instance of the
Prosody XMPP server (https://prosody.im/) for use in integration tests.

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration: new integration test helpers

The internal/integration package is designed to make it easy to spin up
and configure servers for integration tests.
It is not meant to be used directly, instead it is meant to aid in
writing other packages that spin up specific servers and tools.

Fixes #42

Signed-off-by: Sam Whited <sam@samwhited.com>
design: add service discovery proposal

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: bump minimum supported Go version to 1.14

Document that the lowest version of Go that we currently support is Go
1.14.

Signed-off-by: Sam Whited <sam@samwhited.com>
roster: remove workaround for encoding/xml bug

An issue existed in versions of Go prior to 1.14 that caused the decoder
to error if the underlying xml.TokenReader returned a token and io.EOF
at the same time.
Now that this is fixed in all supported versions of Go, remove our
workaround.

See https://golang.org/cl/130556

Fixes #29

Signed-off-by: Sam Whited <sam@samwhited.com>
docs: add list of XEPs

Signed-off-by: Sam Whited <sam@samwhited.com>
stanza: fix error on stanzas with empty to/from

Previously the "to" and "from" elements were always parsed as a JID,
even if they were empty. However, an empty to/from is valid even though
it is not a valid JID and would result in an error.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: release v0.17.0

Signed-off-by: Sam Whited <sam@samwhited.com>
examples: cleanup examples and bump deps

Signed-off-by: Sam Whited <sam@samwhited.com>
styling: add simple fuzz testing tool

Signed-off-by: Sam Whited <sam@samwhited.com>
docs: add GitHub sponsors to FUNDING.yml

Signed-off-by: Sam Whited <sam@samwhited.com>
styling: make CopyToken test comprehensive

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