Files
lambda/xmpp-bookmarks.go

23 lines
633 B
Go

package main
import (
"encoding/xml"
"gosrc.io/xmpp/stanza"
)
// Implementation of XEP-0402: PEP Native Bookmarks
// https://xmpp.org/extensions/xep-0402.html
type Bookmark struct {
XMLName xml.Name `xml:"urn:xmpp:bookmarks:1 conference"`
Name string `xml:"name,attr,omitempty"`
Autojoin bool `xml:"autojoin,attr,omitempty"`
Nick string `xml:"nick,omitempty"`
Password string `xml:"password,omitempty"`
Extensions []any `xml:"extensions,omitempty"`
}
func init() {
stanza.TypeRegistry.MapExtension(stanza.PKTIQ, xml.Name{Space: "urn:xmpp:bookmarks:1", Local: "conference"}, Bookmark{})
}