ui changes
This commit is contained in:
1 parent
19b43345f7
commit
ca4548d3b0
2 files changed
+58
-17
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user