aboutsummaryrefslogtreecommitdiff
path: root/xmpp/extensions
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-03-05 11:00:53 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-03-05 11:00:53 +0300
commit4a5b83dff5c568871d5624202e2ee27e5d0de242 (patch)
tree05360ccd21770b830c29ebaacf6ef00787ad1a68 /xmpp/extensions
parent6e32c62f8dac5ccc97dd0a6067965ba2689f3c86 (diff)
Show XEP-0461 replies from Telegram
Diffstat (limited to 'xmpp/extensions')
-rw-r--r--xmpp/extensions/extensions.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/xmpp/extensions/extensions.go b/xmpp/extensions/extensions.go
index fac5e7b..ce27656 100644
--- a/xmpp/extensions/extensions.go
+++ b/xmpp/extensions/extensions.go
@@ -111,6 +111,13 @@ type IqVcardDesc struct {
Text string `xml:",chardata"`
}
+// Reply is from XEP-0461
+type Reply struct {
+ XMLName xml.Name `xml:"urn:xmpp:reply:0 reply"`
+ To string `xml:"to,attr"`
+ Id string `xml:"id,attr"`
+}
+
// Namespace is a namespace!
func (c PresenceNickExtension) Namespace() string {
return c.XMLName.Space
@@ -131,6 +138,11 @@ func (c IqVcardTemp) GetSet() *stanza.ResultSet {
return c.ResultSet
}
+// Namespace is a namespace!
+func (c Reply) Namespace() string {
+ return c.XMLName.Space
+}
+
func init() {
// presence nick
stanza.TypeRegistry.MapExtension(stanza.PKTPresence, xml.Name{
@@ -149,4 +161,10 @@ func init() {
"vcard-temp",
"vCard",
}, IqVcardTemp{})
+
+ // reply
+ stanza.TypeRegistry.MapExtension(stanza.PKTMessage, xml.Name{
+ "urn:xmpp:reply:0",
+ "reply",
+ }, Reply{})
}