mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 12:23:46 -07:00
Fix examples
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"github.com/mattn/go-gtk/gtk"
|
||||
"github.com/mattn/go-xmpp"
|
||||
"log"
|
||||
@@ -56,7 +57,7 @@ func main() {
|
||||
|
||||
dialog.AddButton(gtk.STOCK_OK, gtk.RESPONSE_OK)
|
||||
dialog.AddButton(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||
dialog.SetDefaultResponse(int(gtk.RESPONSE_OK))
|
||||
dialog.SetDefaultResponse(gtk.RESPONSE_OK)
|
||||
dialog.SetTransientFor(window)
|
||||
dialog.ShowAll()
|
||||
res := dialog.Run()
|
||||
@@ -67,6 +68,11 @@ func main() {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
xmpp.DefaultConfig = tls.Config {
|
||||
ServerName: "talk.google.com",
|
||||
InsecureSkipVerify: false,
|
||||
}
|
||||
|
||||
talk, err := xmpp.NewClient("talk.google.com:443", username_, password_, false)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user