Add from to Ox messages.

ox
Martin Dosch 2 years ago
parent 802331ec27
commit 57e272ac94

@ -12,6 +12,7 @@ type OxMessageElement struct {
Text string `xml:",chardata"`
To string `xml:"to,attr"`
Id string `xml:"id,attr"`
From string `xml:"from,attr"`
Openpgp struct {
Text string `xml:",chardata"`
Xmlns string `xml:"xmlns,attr"`

@ -124,6 +124,7 @@ func oxEncrypt(client *xmpp.Client, recipient string, message string) (string, e
}
oxMessage.To = recipient
oxMessage.Id = getID()
oxMessage.From = client.JID()
oxMessage.Openpgp.Text = base64.StdEncoding.EncodeToString(pgpMessage.Data)
oxMessage.Openpgp.Xmlns = nsOx
oxMessage.Body = oxAltBody

Loading…
Cancel
Save