mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-18 10:22:55 -07:00
Fix missing default channel creation
This commit is contained in:
committed by
Mickaël Rémond
parent
83ae778d33
commit
909cf753c9
@@ -58,7 +58,10 @@ type Component struct {
|
||||
}
|
||||
|
||||
func NewComponent(opts ComponentOptions) (*Component, error) {
|
||||
return &Component{ComponentOptions: opts}, nil
|
||||
c := Component{ComponentOptions: opts}
|
||||
// Create a default channel that developers can override
|
||||
c.RecvChannel = make(chan interface{})
|
||||
return &c, nil
|
||||
}
|
||||
|
||||
// Connect triggers component connection to XMPP server component port.
|
||||
|
||||
Reference in New Issue
Block a user