forked from jshiffer/go-xmpp
- Changed IQ stanzas to pointer semantics
- Fixed commands from v 0.4.0 and tests - Added primitive Result Sets support (XEP-0059)
This commit is contained in:
+3
-3
@@ -9,8 +9,8 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var ErrTransportProtocolNotSupported = errors.New("Transport protocol not supported")
|
||||
var ErrTLSNotSupported = errors.New("Transport does not support StartTLS")
|
||||
var ErrTransportProtocolNotSupported = errors.New("transport protocol not supported")
|
||||
var ErrTLSNotSupported = errors.New("transport does not support StartTLS")
|
||||
|
||||
// TODO: rename to transport config?
|
||||
type TransportConfiguration struct {
|
||||
@@ -67,7 +67,7 @@ func NewClientTransport(config TransportConfiguration) Transport {
|
||||
// will be returned.
|
||||
func NewComponentTransport(config TransportConfiguration) (Transport, error) {
|
||||
if strings.HasPrefix(config.Address, "ws:") || strings.HasPrefix(config.Address, "wss:") {
|
||||
return nil, fmt.Errorf("Components only support XMPP transport: %w", ErrTransportProtocolNotSupported)
|
||||
return nil, fmt.Errorf("components only support XMPP transport: %w", ErrTransportProtocolNotSupported)
|
||||
}
|
||||
|
||||
config.Address = ensurePort(config.Address, 5222)
|
||||
|
||||
Reference in New Issue
Block a user