BOOKMARKS! BOOKMARKS! WE GOT BOOKMARKS PEOPLE
This commit is contained in:
22
xmpp-bookmarks.go
Normal file
22
xmpp-bookmarks.go
Normal file
@@ -0,0 +1,22 @@
|
||||
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{})
|
||||
}
|
||||
Reference in New Issue
Block a user