Ox: Don't encrypt empty messages.

oxmuc
Martin Dosch 2 years ago
parent 5326b2b558
commit ce8f783301

@ -3,6 +3,7 @@
## Unreleased
### Changed
- Ox: Improved error messages for failed key requests.
- Ox: Don't encrypt empty messages.
## [v0.5.1] 2022-05-22
### Changed

@ -662,6 +662,9 @@ func oxGetPublicKeyRing(client *xmpp.Client, iqc chan xmpp.IQ,
func oxEncrypt(client *xmpp.Client, iqc chan xmpp.IQ, oxPrivKey *crypto.Key,
recipient string, keyRing *crypto.KeyRing, message string) (string, error) {
if message == "" {
return "", nil
}
privKeyRing, err := crypto.NewKeyRing(oxPrivKey)
if err != nil {
return "error", err

Loading…
Cancel
Save