some qol stuff
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/go-analyze/charts"
|
||||
"golang.org/x/net/html/charset"
|
||||
"path/filepath"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"gosrc.io/xmpp"
|
||||
@@ -176,6 +177,8 @@ func main() {
|
||||
{Var: "http://jabber.org/protocol/muc"},
|
||||
{Var: "λ"},
|
||||
{Var: "urn:xmpp:attention:0"},
|
||||
{Var: "urn:xmpp:carbons:2"},
|
||||
{Var: "urn:xmpp:ping"},
|
||||
},
|
||||
}
|
||||
iqResp.Payload = &payload
|
||||
@@ -433,9 +436,10 @@ func main() {
|
||||
pingStatus.AddCSSClass("pending")
|
||||
before := time.Now()
|
||||
iq := new(stanza.IQ)
|
||||
iq.Id = uuid.New().String()
|
||||
iq.From = clientroot.Session.BindJid
|
||||
iq.To = iq.From
|
||||
iq.Type = "get"
|
||||
iq.Payload = &Ping{}
|
||||
|
||||
ctx, _ := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
mychan, err := client.SendIQ(ctx, iq)
|
||||
@@ -1161,6 +1165,7 @@ func activate(app *gtk.Application) {
|
||||
|
||||
i := (gtk.NewImageFromPaintable(clientAssets["chart_bar"]))
|
||||
i.AddCSSClass("icon")
|
||||
|
||||
pBox.Append(i)
|
||||
pingStatus = gtk.NewLabel("...")
|
||||
pBox.Append(pingStatus)
|
||||
|
||||
Reference in New Issue
Block a user