some qol stuff

This commit is contained in:
2026-05-10 14:46:19 +01:00
parent 1aa14f9fd5
commit 98cd855349
8 changed files with 66 additions and 6 deletions
+6 -1
View File
@@ -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)