ui changes

This commit is contained in:
2026-01-31 10:02:04 +00:00
parent 19b43345f7
commit ca4548d3b0
2 changed files with 58 additions and 17 deletions

View File

@@ -16,6 +16,19 @@ import (
"path/filepath"
)
func generatePresenceWidget(p stanza.Packet) gtk.Widgetter {
presence, ok := p.(stanza.Presence)
if !ok {
return gtk.NewLabel("Unsupported message.")
}
if presence.Type == stanza.PresenceTypeUnavailable {
return gtk.NewLabel(jid.MustParse(presence.From).Resourcepart() + " left the room")
} else {
return gtk.NewLabel(jid.MustParse(presence.From).Resourcepart() + " joined the room")
}
}
func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
m, ok := p.(stanza.Message)
if !ok {