|
|
|
@ -264,6 +264,7 @@ func main() {
|
|
|
|
|
if *flagOx {
|
|
|
|
|
re.OxKeyRing, err = oxGetPublicKeyRing(client, r)
|
|
|
|
|
if err != nil {
|
|
|
|
|
re.OxKeyRing = nil
|
|
|
|
|
fmt.Println("Couldn't receive key for:", r)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -507,7 +508,10 @@ func main() {
|
|
|
|
|
scanner.Scan()
|
|
|
|
|
message = scanner.Text()
|
|
|
|
|
for _, recipient := range recipients {
|
|
|
|
|
if *flagOx && recipient.OxKeyRing != nil {
|
|
|
|
|
if *flagOx {
|
|
|
|
|
if recipient.OxKeyRing == nil {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
oxMessage, err := oxEncrypt(client, oxPrivKey,
|
|
|
|
|
recipient.Jid, recipient.OxKeyRing, message)
|
|
|
|
|
if err != nil {
|
|
|
|
@ -537,7 +541,10 @@ func main() {
|
|
|
|
|
_, err = client.Send(xmpp.Chat{Remote: recipient.Jid,
|
|
|
|
|
Type: "chat", Ooburl: message, Text: message})
|
|
|
|
|
} else {
|
|
|
|
|
if *flagOx && recipient.OxKeyRing != nil {
|
|
|
|
|
if *flagOx {
|
|
|
|
|
if recipient.OxKeyRing == nil {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
oxMessage, err := oxEncrypt(client, oxPrivKey,
|
|
|
|
|
recipient.Jid, recipient.OxKeyRing, message)
|
|
|
|
|
if err != nil {
|
|
|
|
|