~samwhited/xmpp

ref: 8a516e9e064619dcb3d84499b66e1562546be918 xmpp/receipts d---------
all: use xmlstream.Iter and remove internal/iter

The internal/iter package previously contained an API for iterating over
child elements and decoding them lazily.

This is needed by any package that exposes an iterator such as the
roster package, and is mentioned in the documentation
(https://mellium.im/docs/extensions) as the API to use when creating
your own extensions, but it was internal and not actually usable by this
package. Its own doc comment said that it would eventually be exported
when the API stabalized. It hasn't been necessary to change the API
since creating it so it became time to let it graduate to the
mellium.im/xmlstream module where it can be more broadly useful.

This patch bumps the version of xmlstream used and makes the minor
changes necessary to use the xmlstream version of the iterator. It also
removes the old internal/iter package and updates the documentation to
mention its new location as part of xmlstream.

They grow up so fast!

Signed-off-by: Sam Whited <sam@samwhited.com>
receipts: fix broken doc comment

Fix some copy/pasta from the xtime package that had leaked into
receipts.

Signed-off-by: Sam Whited <sam@samwhited.com>
receipts: limit the amount of locking required

Limiting the amount of output stream locking required to just the actual
sending of the element means we don't have to block the entire output
stream while we wait for a response, which will likely lead to deadlock.

Signed-off-by: Sam Whited <sam@samwhited.com>
receipts: fix resource leak

Previously messages weren't removed from being tracked by the handler
after they were acked or after the context was canceled. This patch
makes sure they are removed, and adds a regression test to double check
that they're removed on context cancelation.

Signed-off-by: Sam Whited <sam@samwhited.com>
receipts: new Message Delivery Receipts package

This patch imlements XEP-0184: Message Delivery Receipts
(https://xmpp.org/extensions/xep-0184.html).

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