mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-04-27 17:33:01 -07:00
Let component handle discovery for now
This commit is contained in:
committed by
Mickaël Rémond
parent
909cf753c9
commit
bc2fad6693
16
component.go
16
component.go
@@ -141,16 +141,6 @@ func (c *Component) recv() (err error) {
|
||||
close(c.RecvChannel)
|
||||
c.streamError(p.Error.Local, p.Text)
|
||||
return errors.New("stream error: " + p.Error.Local)
|
||||
case IQ:
|
||||
switch inner := p.Payload[0].(type) {
|
||||
// Our component module handle disco info but can let component implementation
|
||||
// handle disco items queries
|
||||
case *DiscoInfo:
|
||||
if p.Type == "get" {
|
||||
c.discoResult(p.PacketAttrs, inner)
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
c.RecvChannel <- val
|
||||
}
|
||||
@@ -247,3 +237,9 @@ func (c *Component) discoResult(attrs PacketAttrs, info *DiscoInfo) {
|
||||
|
||||
_ = c.Send(iq)
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: Add support for discovery management directly in component
|
||||
TODO: Support multiple identities on disco info
|
||||
TODO: Support returning features on disco info
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user