forked from sunglocto/lambda
20 lines
429 B
Go
20 lines
429 B
Go
package main
|
|
|
|
import (
|
|
"encoding/xml"
|
|
"gosrc.io/xmpp/stanza"
|
|
)
|
|
|
|
// Implementation of XEP-0359: Unique and Stable Stanza IDs
|
|
|
|
type StanzaID struct {
|
|
stanza.MsgExtension
|
|
XMLName xml.Name `xml:"urn:xmpp:sid:0 stanza-id"`
|
|
By string `xml:"by,attr"`
|
|
ID string `xml:"id,attr"`
|
|
}
|
|
|
|
func init() {
|
|
stanza.TypeRegistry.MapExtension(stanza.PKTMessage, xml.Name{Space: "urn:xmpp:sid:0", Local: "stanza-id"}, StanzaID{})
|
|
}
|