diff options
-rw-r--r-- | xmpp/iq.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -14,6 +14,13 @@ type iqRx struct { Bind struct{ Jid string `xml:"jid"` } `xml:"urn:ietf:params:xml:ns:xmpp-bind bind"` + Query []RosterItem `xml:"jabber:iq:roster query>item"` +} + +type RosterItem struct { + Jid string `xml:"jid,attr"` + Subscription string `xml:"subscription,attr"` + Name string `xml:"name,attr"` } func (i iqRx) handle(s *session) { @@ -23,6 +30,13 @@ func (i iqRx) handle(s *session) { s.sendRosterGet() return } + + if len(i.Query) > 0 { + log.Println("Got roster:") + for _, v := range i.Query { + log.Printf("- %s\n", v.Jid) + } + } } type bindSet struct { |