diff options
Diffstat (limited to 'limox.go')
-rw-r--r-- | limox.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -27,6 +27,7 @@ type Limox struct { PwdEditor widget.Editor ConnectButton widget.Clickable DisconnectButton widget.Clickable + Roster []xmpp.RosterItem sessionIn chan<- any sessionOut chan any State LimoxState @@ -70,11 +71,14 @@ func (l *Limox) run() error { l.draw(e) } case data := <-l.sessionOut: - switch data.(type) { + switch d := data.(type) { case xmpp.SessionDisconnect: l.State = Disconnected + l.Roster = make([]xmpp.RosterItem, 0) case xmpp.SessionConnect: l.State = Connected + case []xmpp.RosterItem: + l.Roster = d default: log.Printf("Unknown XMPP data '%d'\n", data) } |