2019-06-04 09:36:29 -07:00
|
|
|
package xmpp // import "gosrc.io/xmpp"
|
2019-06-03 03:40:42 -07:00
|
|
|
|
|
|
|
import "encoding/xml"
|
|
|
|
|
|
|
|
/*
|
|
|
|
Support for:
|
|
|
|
- XEP-0184 - Message Delivery Receipts: https://xmpp.org/extensions/xep-0184.html
|
|
|
|
*/
|
|
|
|
|
2019-06-04 08:04:25 -07:00
|
|
|
// Used on outgoing message, to tell the recipient that you are requesting a message receipt / ack.
|
|
|
|
type ReceiptRequest struct {
|
|
|
|
MsgExtension
|
|
|
|
XMLName xml.Name `xml:"urn:xmpp:receipts request"`
|
|
|
|
}
|
2019-06-03 03:40:42 -07:00
|
|
|
|
2019-06-04 08:04:25 -07:00
|
|
|
type ReceiptReceived struct {
|
2019-06-03 03:40:42 -07:00
|
|
|
MsgExtension
|
2019-06-04 08:04:25 -07:00
|
|
|
XMLName xml.Name `xml:"urn:xmpp:receipts received"`
|
|
|
|
ID string
|
2019-06-03 03:40:42 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2019-06-04 08:04:25 -07:00
|
|
|
typeRegistry.MapExtension(PKTMessage, xml.Name{"urn:xmpp:receipts", "request"}, ReceiptRequest{})
|
|
|
|
typeRegistry.MapExtension(PKTMessage, xml.Name{"urn:xmpp:receipts", "received"}, ReceiptReceived{})
|
2019-06-03 03:40:42 -07:00
|
|
|
}
|