go-xmpp/stanza/msg_receipts.go
rcorniere 8798ff6fc1 - Changed IQ stanzas to pointer semantics
- Fixed commands from v 0.4.0 and tests
- Added primitive Result Sets support (XEP-0059)
2020-01-31 11:48:03 +01:00

30 lines
753 B
Go

package stanza
import (
"encoding/xml"
)
/*
Support for:
- XEP-0184 - Message Delivery Receipts: https://xmpp.org/extensions/xep-0184.html
*/
const NSMsgReceipts = "urn:xmpp:receipts"
// 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"`
}
type ReceiptReceived struct {
MsgExtension
XMLName xml.Name `xml:"urn:xmpp:receipts received"`
ID string `xml:"id,attr"`
}
func init() {
TypeRegistry.MapExtension(PKTMessage, xml.Name{Space: NSMsgReceipts, Local: "request"}, ReceiptRequest{})
TypeRegistry.MapExtension(PKTMessage, xml.Name{Space: NSMsgReceipts, Local: "received"}, ReceiptReceived{})
}