From aa8e79aa88fdbe313f4828e2c1379741cc808478 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Fri, 22 Apr 2022 13:22:37 +0200 Subject: [PATCH] Ox: Add store hint. --- const.go | 1 + iqstructs.go | 4 ++++ ox.go | 1 + 3 files changed, 6 insertions(+) diff --git a/const.go b/const.go index a18b427..4717ad8 100644 --- a/const.go +++ b/const.go @@ -7,6 +7,7 @@ package main const ( VERSION = "0.4.0-devel" nsEme = "urn:xmpp:eme:0" + nsHints = "urn:xmpp:hints" nsHttpUpload = "urn:xmpp:http:upload:0" nsJabberClient = "jabber:client" nsJabberData = "jabber:x:data" diff --git a/iqstructs.go b/iqstructs.go index 6cc69f1..4d61170 100644 --- a/iqstructs.go +++ b/iqstructs.go @@ -12,6 +12,10 @@ type OxMessageElement struct { Text string `xml:",chardata"` To string `xml:"to,attr"` Id string `xml:"id,attr"` + Store struct { + Text string `xml:",chardata"` + Xmlns string `xml:"xmlns,attr"` + } `xml:"store"` Openpgp struct { Text string `xml:",chardata"` Xmlns string `xml:"xmlns,attr"` diff --git a/ox.go b/ox.go index 5f9fb3b..0a2aece 100644 --- a/ox.go +++ b/ox.go @@ -511,6 +511,7 @@ func oxEncrypt(client *xmpp.Client, oxPrivKey *crypto.Key, recipient string, } oxMessage.To = recipient oxMessage.Id = getID() + oxMessage.Store.Xmlns = nsHints oxMessage.Openpgp.Text = base64.StdEncoding.EncodeToString(pgpMessage.Data) oxMessage.Openpgp.Xmlns = nsOx oxMessage.Encryption.Xmlns = nsEme