forked from jshiffer/go-xmpp
Remove dead code
For now the component is not able to handle the discovery requests on its own.
This commit is contained in:
parent
08bb9965b8
commit
44568fcf2b
25
component.go
25
component.go
@ -213,31 +213,6 @@ func (handshakeDecoder) decode(p *xml.Decoder, se xml.StartElement) (Handshake,
|
|||||||
return packet, err
|
return packet, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Service discovery
|
|
||||||
|
|
||||||
func (c *Component) discoResult(attrs PacketAttrs, info *DiscoInfo) {
|
|
||||||
iq := NewIQ("result", attrs.To, attrs.From, attrs.Id, "en")
|
|
||||||
var identity Identity
|
|
||||||
if info.Node == "" {
|
|
||||||
identity = Identity{
|
|
||||||
Name: c.Name,
|
|
||||||
Category: c.Category,
|
|
||||||
Type: c.Type,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
payload := DiscoInfo{
|
|
||||||
Identity: identity,
|
|
||||||
Features: []Feature{
|
|
||||||
{Var: NSDiscoInfo},
|
|
||||||
{Var: NSDiscoItems},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
iq.AddPayload(&payload)
|
|
||||||
|
|
||||||
_ = c.Send(iq)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
TODO: Add support for discovery management directly in component
|
TODO: Add support for discovery management directly in component
|
||||||
TODO: Support multiple identities on disco info
|
TODO: Support multiple identities on disco info
|
||||||
|
Loading…
Reference in New Issue
Block a user