forked from jshiffer/go-xmpp
Return all pubsub IQs. (#137)
* Return all pubsub IQs. This makes other pubsub requests accessible via client.Recv(). * Fix formatting (gofmt).
This commit is contained in:
parent
e773596ea0
commit
99ddfc1aa4
8
xmpp.go
8
xmpp.go
@ -818,6 +818,14 @@ func (c *Client) Recv() (stanza interface{}, err error) {
|
||||
return handleAvatarMetadata(p.Items[0].Body,
|
||||
v
|
||||
}*/
|
||||
default:
|
||||
res, err := xml.Marshal(v.Query)
|
||||
if err != nil {
|
||||
return Chat{}, err
|
||||
}
|
||||
|
||||
return IQ{ID: v.ID, From: v.From, To: v.To, Type: v.Type,
|
||||
Query: res}, nil
|
||||
}
|
||||
case v.Query.XMLName.Local == "":
|
||||
return IQ{ID: v.ID, From: v.From, To: v.To, Type: v.Type}, nil
|
||||
|
Loading…
Reference in New Issue
Block a user