22 lines
540 B
Go
22 lines
540 B
Go
package main
|
|
|
|
// Implementation of XEP-0491: WebXDC
|
|
// https://xmpp.org/extensions/xep-0491.html
|
|
|
|
import (
|
|
"encoding/xml"
|
|
"gosrc.io/xmpp/stanza"
|
|
)
|
|
|
|
type XDCEl struct {
|
|
stanza.MsgExtension
|
|
XMLName xml.Name `xml:"urn:xmpp:webxdc:0 x"`
|
|
Document string `xml:"document"`
|
|
Summary string `xml:"summary"`
|
|
Payload string `xml:"urn:xmpp:json:0 json"` // TODO: Independent JSOn container type (XEP-0335)
|
|
}
|
|
|
|
func init() {
|
|
stanza.TypeRegistry.MapExtension(stanza.PKTMessage, xml.Name{Space: "urn:xmpp:webxdc:0", Local: "x"}, XDCEl{})
|
|
}
|