Files
lambda/xmpp-mentions.go

25 lines
741 B
Go
Raw Normal View History

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
2026-03-10 16:48:10 +00:00
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"`
JID string `xml:"ji,attr,omitempty"`
}
func init() {
stanza.TypeRegistry.MapExtension(stanza.PKTMessage, xml.Name{Space: "urn:xmpp:mentions:0", Local: "mention"}, Mention{})
}