diff --git a/go-sendxmpp.go b/go-sendxmpp.go index e89452d..85626f2 100644 --- a/go-sendxmpp.go +++ b/go-sendxmpp.go @@ -339,8 +339,17 @@ func main() { } else { // Send the message. for _, recipient := range recipients { - _, err = client.Send(xmpp.Chat{Remote: recipient, - Type: "groupchat", Text: message}) + if *flagHttpUpload != "" { + _, err = client.SendOrg("" + + "" + message + "" + + "" + + message + "") + } else { + _, err = client.Send(xmpp.Chat{Remote: recipient, + Type: "groupchat", Text: message}) + } if err != nil { // Try to nicely close connection, // even if there was an error sending. @@ -379,8 +388,17 @@ func main() { } } else { for _, recipient := range recipients { - _, err = client.Send(xmpp.Chat{Remote: recipient, Type: "chat", - Text: message}) + if *flagHttpUpload != "" { + _, err = client.SendOrg("" + + "" + message + "" + + "" + + message + "") + } else { + _, err = client.Send(xmpp.Chat{Remote: recipient, Type: "chat", + Text: message}) + } if err != nil { // Try to nicely close connection, // even if there was an error sending. diff --git a/httpupload.go b/httpupload.go index af7da5a..d28fca2 100644 --- a/httpupload.go +++ b/httpupload.go @@ -5,7 +5,6 @@ // TODO: // * Check filesize limit before trying to send // * Check IQ replies for type='error' -// * Send link OOB // * Update Manpages package main