Attention and experimental mentions impl
This commit is contained in:
23
xmpp-mentions.go
Normal file
23
xmpp-mentions.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"gosrc.io/xmpp/stanza"
|
||||
)
|
||||
|
||||
// Experimental implementation of XEP-XXXX: Explicit Mentions
|
||||
// https://git.isekai.rocks/snit/protoxeps/tree/explicit-mentions.xml
|
||||
|
||||
type Mention struct {
|
||||
stanza.MsgExtension
|
||||
XMLName xml.Name `xml:"urn:xmpp:mentions:0 mention"`
|
||||
Mentions string `xml:"mentions,attr,omitempty"`
|
||||
URI string `xml:"uri,attr,omitempty"`
|
||||
Begin int `xml:"begin,attr,omitempty"`
|
||||
End int `xml:"end,attr,omitempty"`
|
||||
OccupantID string `xml:"occupantid,attr,omitempty"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
stanza.TypeRegistry.MapExtension(stanza.PKTMessage, xml.Name{Space: "urn:xmpp:mentions:0", Local: "mention"}, Mention{})
|
||||
}
|
||||
Reference in New Issue
Block a user