BOOKMARKS! BOOKMARKS! WE GOT BOOKMARKS PEOPLE

This commit is contained in:
2026-02-16 09:52:25 +00:00
parent 09a809c102
commit e026e777f6
11 changed files with 160 additions and 17 deletions

22
xmpp-bookmarks.go Normal file
View 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{})
}