~samwhited/xmpp

xtime: re-enable ejabberd integration tests

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

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

Fixes #152

Signed-off-by: Sam Whited <sam@samwhited.com>
.builds: mirror to Codeberg

Signed-off-by: Sam Whited <sam@samwhited.com>
dial: retry DNS integration tests up to 3 times

These are probably our most flaky integration tests. Retry them up to 3
times to try and reduce the flake to acceptable levels.

Signed-off-by: Sam Whited <sam@samwhited.com>
muc: add method to set subject

Signed-off-by: Sam Whited <sam@samwhited.com>
muc: allow re-syncing rooms

Signed-off-by: Sam Whited <sam@samwhited.com>
muc: use new muc channel config

Signed-off-by: Sam Whited <sam@samwhited.com>
internal/integration/prosody: add muc room config

Allowing us to pre-configure MUC rooms will reduce boilerplate (and
round trips) for integration tests in the muc package.

Also ship the license file like we do for Go to make sure we're properly
attributing the authors and following the license to the best of our
ability.

Signed-off-by: Sam Whited <sam@samwhited.com>
muc: fix broken tests

Don't check for the 110 status code, just check that we're expecting a
presence.

Signed-off-by: Sam Whited <sam@samwhited.com>
muc: add ability to set affiliation and handle changes

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

examples/im: use new muc package

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: fix stanza error reply association

Previously we would try to track presence or message stanzas of types
other than error, even though they would never match an ID in the
tracked stanzas. This didn't cause problems, it was just an extra check.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: simplify xml wrapping

Signed-off-by: Sam Whited <sam@samwhited.com>
roster: add type to IQ response in test

Previously this didn't matter even though it was technically invalid,
but now we won't associate it with the response unless the type is
specified, causing the test to block.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: add Message and Presence send methods

Signed-off-by: Sam Whited <sam@samwhited.com>
.builds: use the main branch of checkdoc

Go modules is absolutely convinced that the latest version should be the
old "master" branch even though it's deleted unless we explicitly use
@main.

Signed-off-by: Sam Whited <sam@samwhited.com>
stanza: add Error method to Presence and Message

Like IQs replying with an error involves switching the to/from
attributes and making sure the type is set to "error" so it makes sense
to have the Error method on both Presence and Message too.

While doing this I noticed that each stanza marshaled its attribute
order differently. While it doesn't matter and this is not a guaranteed
part of the API, it would be nice if they were consistent so I also
switched those around and fixed a few minor documentation issues.

Finally, since we were adding a Presence and Message Error method with a
test I also added a test belatedly for the IQ Error method.

Signed-off-by: Sam Whited <sam@samwhited.com>
stanza: add UnmarshalError function

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: fix docs showing old API

The old stanza.WrapPresence function is now a method on the presence
itself (stanza.Presence{}.Wrap()).

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