forked from sunglocto/lambda
initial commit
This commit is contained in:
19
xmpp-sid.go
Normal file
19
xmpp-sid.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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{})
|
||||
}
|
||||
Reference in New Issue
Block a user