a lodda changes my guy

This commit is contained in:
2026-01-30 15:56:58 +00:00
parent d82dc87af1
commit 63ad9247bc
10 changed files with 101 additions and 82 deletions

14
main.go
View File

@@ -19,6 +19,7 @@ import (
_ "embed"
"encoding/xml"
"runtime"
)
var loadedConfig lambdaConfig
@@ -70,10 +71,10 @@ func main() {
TransportConfiguration: xmpp.TransportConfiguration{
Address: loadedConfig.Server,
},
Jid: loadedConfig.Username,
Credential: xmpp.Password(loadedConfig.Password),
Insecure: loadedConfig.Insecure,
// StreamLogger: os.Stdout,
Jid: loadedConfig.Username,
Credential: xmpp.Password(loadedConfig.Password),
Insecure: loadedConfig.Insecure,
StreamLogger: os.Stdout,
}
router := xmpp.NewRouter()
@@ -125,13 +126,12 @@ func main() {
}
v := &stanza.Version{}
v = v.SetInfo("Lambda", "1.0", "Windows") // TODO: Allow spoofing and report correct information
v = v.SetInfo("Lambda", lambda_version, runtime.GOOS) // TODO: Allow spoofing on user request
iqResp.Payload = v
s.Send(iqResp)
})
router.HandleFunc("message", func(s xmpp.Sender, p stanza.Packet) {
m, ok := p.(stanza.Message)
if !ok {
@@ -155,7 +155,6 @@ func main() {
_, ok = tabs[originator]
if ok {
fmt.Println("valid")
tabs[originator].msgs.Append(b)
scrollToBottomAfterUpdate(scroller)
} else {
@@ -253,6 +252,7 @@ func activate(app *gtk.Application) {
app.SetMenubar(gio.NewMenu())
window.SetTitle("Lambda")
window.AddCSSClass("ssd")
menu := gtk.NewBox(gtk.OrientationHorizontal, 0)
/*
f_menu := gtk.NewMenuButton()