|
|
|
@ -69,8 +69,14 @@ func httpUpload(client *xmpp.Client, jserver string, filePath string) string {
|
|
|
|
|
// Check the services reported by disco#items for the http upload service
|
|
|
|
|
for _, r := range iqDiscoItemsXMLItems {
|
|
|
|
|
jid := r.SelectAttr("jid")
|
|
|
|
|
iqDiscoInfo, err := sendIQ(client, jid.Value, "get",
|
|
|
|
|
"<query xmlns='http://jabber.org/protocol/disco#info'/>")
|
|
|
|
|
iqDiscoInfoReqXML := etree.NewDocument()
|
|
|
|
|
iqDiscoInfoReqXMLQuery := iqDiscoInfoReqXML.CreateElement("query")
|
|
|
|
|
iqDiscoInfoReqXMLQuery.CreateAttr("xmlns", nsDiscoInfo)
|
|
|
|
|
iqdi, err := iqDiscoInfoReqXML.WriteToString()
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Fatal(err)
|
|
|
|
|
}
|
|
|
|
|
iqDiscoInfo, err := sendIQ(client, jid.Value, "get", iqdi)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Fatal(err)
|
|
|
|
|
}
|
|
|
|
|