refactor: standardize bridge-agnostic terminology and remove unused kvstore functions
- Replace "Room" with "Channel" in bridge-agnostic contexts throughout codebase - Update BridgeRoomID → BridgeChannelID in model structs and all references - Change error messages to use consistent "Channel" terminology for user-facing text - Update log keys: bridge_room_id → bridge_channel_id for consistency - Clean up kvstore constants file by removing unused functions and constants: - Removed BuildXMPPUserKey, BuildMattermostUserKey, BuildGhostUserKey - Removed BuildXMPPEventPostKey, BuildXMPPReactionKey functions - Removed unused constants: KeyPrefixXMPPUser, KeyPrefixMattermostUser, etc. - Keep only actively used BuildChannelMapKey and ExtractIdentifierFromChannelMapKey - Preserve XMPP-specific "Room" terminology in appropriate contexts (client methods, JIDs) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
eb852662f7
commit
4c6aeb2392
8 changed files with 94 additions and 150 deletions
|
@ -264,7 +264,7 @@ func (m *BridgeManager) CreateChannelMapping(req model.CreateChannelMappingReque
|
||||||
return fmt.Errorf("invalid mapping request: %w", err)
|
return fmt.Errorf("invalid mapping request: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
m.logger.LogDebug("Creating channel mapping", "channel_id", req.ChannelID, "bridge_name", req.BridgeName, "bridge_room_id", req.BridgeRoomID, "user_id", req.UserID, "team_id", req.TeamID)
|
m.logger.LogDebug("Creating channel mapping", "channel_id", req.ChannelID, "bridge_name", req.BridgeName, "bridge_channel_id", req.BridgeChannelID, "user_id", req.UserID, "team_id", req.TeamID)
|
||||||
|
|
||||||
// Get the specific bridge
|
// Get the specific bridge
|
||||||
bridge, err := m.GetBridge(req.BridgeName)
|
bridge, err := m.GetBridge(req.BridgeName)
|
||||||
|
@ -279,41 +279,41 @@ func (m *BridgeManager) CreateChannelMapping(req model.CreateChannelMappingReque
|
||||||
}
|
}
|
||||||
|
|
||||||
// NEW: Check if room already mapped to another channel
|
// NEW: Check if room already mapped to another channel
|
||||||
existingChannelID, err := bridge.GetChannelMapping(req.BridgeRoomID)
|
existingChannelID, err := bridge.GetChannelMapping(req.BridgeChannelID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
m.logger.LogError("Failed to check room mapping", "bridge_room_id", req.BridgeRoomID, "error", err)
|
m.logger.LogError("Failed to check channel mapping", "bridge_channel_id", req.BridgeChannelID, "error", err)
|
||||||
return fmt.Errorf("failed to check room mapping: %w", err)
|
return fmt.Errorf("failed to check channel mapping: %w", err)
|
||||||
}
|
}
|
||||||
if existingChannelID != "" {
|
if existingChannelID != "" {
|
||||||
m.logger.LogWarn("Room already mapped to another channel",
|
m.logger.LogWarn("Channel already mapped to another channel",
|
||||||
"bridge_room_id", req.BridgeRoomID,
|
"bridge_channel_id", req.BridgeChannelID,
|
||||||
"existing_channel_id", existingChannelID,
|
"existing_channel_id", existingChannelID,
|
||||||
"requested_channel_id", req.ChannelID)
|
"requested_channel_id", req.ChannelID)
|
||||||
return fmt.Errorf("room '%s' is already mapped to channel '%s'", req.BridgeRoomID, existingChannelID)
|
return fmt.Errorf("channel '%s' is already mapped to channel '%s'", req.BridgeChannelID, existingChannelID)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NEW: Check if room exists on target bridge
|
// NEW: Check if room exists on target bridge
|
||||||
roomExists, err := bridge.ChannelMappingExists(req.BridgeRoomID)
|
channelExists, err := bridge.ChannelMappingExists(req.BridgeChannelID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
m.logger.LogError("Failed to check room existence", "bridge_room_id", req.BridgeRoomID, "error", err)
|
m.logger.LogError("Failed to check channel existence", "bridge_channel_id", req.BridgeChannelID, "error", err)
|
||||||
return fmt.Errorf("failed to check room existence: %w", err)
|
return fmt.Errorf("failed to check channel existence: %w", err)
|
||||||
}
|
}
|
||||||
if !roomExists {
|
if !channelExists {
|
||||||
m.logger.LogWarn("Room does not exist on bridge",
|
m.logger.LogWarn("Channel does not exist on bridge",
|
||||||
"bridge_room_id", req.BridgeRoomID,
|
"bridge_channel_id", req.BridgeChannelID,
|
||||||
"bridge_name", req.BridgeName)
|
"bridge_name", req.BridgeName)
|
||||||
return fmt.Errorf("room '%s' does not exist on %s bridge", req.BridgeRoomID, req.BridgeName)
|
return fmt.Errorf("channel '%s' does not exist on %s bridge", req.BridgeChannelID, req.BridgeName)
|
||||||
}
|
}
|
||||||
|
|
||||||
m.logger.LogDebug("Room validation passed",
|
m.logger.LogDebug("Channel validation passed",
|
||||||
"bridge_room_id", req.BridgeRoomID,
|
"bridge_channel_id", req.BridgeChannelID,
|
||||||
"bridge_name", req.BridgeName,
|
"bridge_name", req.BridgeName,
|
||||||
"room_exists", roomExists,
|
"channel_exists", channelExists,
|
||||||
"already_mapped", false)
|
"already_mapped", false)
|
||||||
|
|
||||||
// Create the channel mapping on the receiving bridge
|
// Create the channel mapping on the receiving bridge
|
||||||
if err = bridge.CreateChannelMapping(req.ChannelID, req.BridgeRoomID); err != nil {
|
if err = bridge.CreateChannelMapping(req.ChannelID, req.BridgeChannelID); err != nil {
|
||||||
m.logger.LogError("Failed to create channel mapping", "channel_id", req.ChannelID, "bridge_name", req.BridgeName, "bridge_room_id", req.BridgeRoomID, "error", err)
|
m.logger.LogError("Failed to create channel mapping", "channel_id", req.ChannelID, "bridge_name", req.BridgeName, "bridge_channel_id", req.BridgeChannelID, "error", err)
|
||||||
return fmt.Errorf("failed to create channel mapping for bridge '%s': %w", req.BridgeName, err)
|
return fmt.Errorf("failed to create channel mapping for bridge '%s': %w", req.BridgeName, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,19 +324,19 @@ func (m *BridgeManager) CreateChannelMapping(req model.CreateChannelMappingReque
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the channel mapping in the Mattermost bridge
|
// Create the channel mapping in the Mattermost bridge
|
||||||
if err = mattermostBridge.CreateChannelMapping(req.ChannelID, req.BridgeRoomID); err != nil {
|
if err = mattermostBridge.CreateChannelMapping(req.ChannelID, req.BridgeChannelID); err != nil {
|
||||||
m.logger.LogError("Failed to create channel mapping in Mattermost bridge", "channel_id", req.ChannelID, "bridge_name", req.BridgeName, "bridge_room_id", req.BridgeRoomID, "error", err)
|
m.logger.LogError("Failed to create channel mapping in Mattermost bridge", "channel_id", req.ChannelID, "bridge_name", req.BridgeName, "bridge_channel_id", req.BridgeChannelID, "error", err)
|
||||||
return fmt.Errorf("failed to create channel mapping in Mattermost bridge: %w", err)
|
return fmt.Errorf("failed to create channel mapping in Mattermost bridge: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Share the channel using Mattermost's shared channels API
|
// Share the channel using Mattermost's shared channels API
|
||||||
if err = m.shareChannel(req); err != nil {
|
if err = m.shareChannel(req); err != nil {
|
||||||
m.logger.LogError("Failed to share channel", "channel_id", req.ChannelID, "bridge_room_id", req.BridgeRoomID, "error", err)
|
m.logger.LogError("Failed to share channel", "channel_id", req.ChannelID, "bridge_channel_id", req.BridgeChannelID, "error", err)
|
||||||
// Don't fail the entire operation if sharing fails, but log the error
|
// Don't fail the entire operation if sharing fails, but log the error
|
||||||
m.logger.LogWarn("Channel mapping created but sharing failed - channel may not sync properly")
|
m.logger.LogWarn("Channel mapping created but sharing failed - channel may not sync properly")
|
||||||
}
|
}
|
||||||
|
|
||||||
m.logger.LogInfo("Successfully created channel mapping", "channel_id", req.ChannelID, "bridge_name", req.BridgeName, "bridge_room_id", req.BridgeRoomID)
|
m.logger.LogInfo("Successfully created channel mapping", "channel_id", req.ChannelID, "bridge_name", req.BridgeName, "bridge_channel_id", req.BridgeChannelID)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -403,9 +403,9 @@ func (m *BridgeManager) shareChannel(req model.CreateChannelMappingRequest) erro
|
||||||
TeamId: req.TeamID,
|
TeamId: req.TeamID,
|
||||||
Home: true,
|
Home: true,
|
||||||
ReadOnly: false,
|
ReadOnly: false,
|
||||||
ShareName: model.SanitizeShareName(fmt.Sprintf("bridge-%s", req.BridgeRoomID)),
|
ShareName: model.SanitizeShareName(fmt.Sprintf("bridge-%s", req.BridgeChannelID)),
|
||||||
ShareDisplayName: fmt.Sprintf("Bridge: %s", req.BridgeRoomID),
|
ShareDisplayName: fmt.Sprintf("Bridge: %s", req.BridgeChannelID),
|
||||||
SharePurpose: fmt.Sprintf("Shared channel bridged to %s", req.BridgeRoomID),
|
SharePurpose: fmt.Sprintf("Shared channel bridged to %s", req.BridgeChannelID),
|
||||||
ShareHeader: "test header",
|
ShareHeader: "test header",
|
||||||
CreatorId: req.UserID,
|
CreatorId: req.UserID,
|
||||||
RemoteId: m.remoteID,
|
RemoteId: m.remoteID,
|
||||||
|
|
|
@ -26,12 +26,12 @@ type messageBus struct {
|
||||||
subscribersMu sync.RWMutex
|
subscribersMu sync.RWMutex
|
||||||
|
|
||||||
// Lifecycle management
|
// Lifecycle management
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
cancel context.CancelFunc
|
cancel context.CancelFunc
|
||||||
logger logger.Logger
|
logger logger.Logger
|
||||||
wg sync.WaitGroup
|
wg sync.WaitGroup
|
||||||
started bool
|
started bool
|
||||||
startMu sync.Mutex
|
startMu sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMessageBus creates a new message bus instance
|
// NewMessageBus creates a new message bus instance
|
||||||
|
@ -228,10 +228,10 @@ func (mb *messageBus) GetStats() map[string]interface{} {
|
||||||
defer mb.subscribersMu.RUnlock()
|
defer mb.subscribersMu.RUnlock()
|
||||||
|
|
||||||
stats := map[string]interface{}{
|
stats := map[string]interface{}{
|
||||||
"started": mb.started,
|
"started": mb.started,
|
||||||
"subscriber_count": len(mb.subscribers),
|
"subscriber_count": len(mb.subscribers),
|
||||||
"buffer_size": DefaultMessageBufferSize,
|
"buffer_size": DefaultMessageBufferSize,
|
||||||
"pending_messages": len(mb.incomingMessages),
|
"pending_messages": len(mb.incomingMessages),
|
||||||
}
|
}
|
||||||
|
|
||||||
subscribers := make([]string, 0, len(mb.subscribers))
|
subscribers := make([]string, 0, len(mb.subscribers))
|
||||||
|
|
|
@ -161,11 +161,11 @@ func (c *Handler) executeMapCommand(args *model.CommandArgs, fields []string) *m
|
||||||
|
|
||||||
// Create the mapping using BridgeManager
|
// Create the mapping using BridgeManager
|
||||||
mappingReq := pluginModel.CreateChannelMappingRequest{
|
mappingReq := pluginModel.CreateChannelMappingRequest{
|
||||||
ChannelID: channelID,
|
ChannelID: channelID,
|
||||||
BridgeName: "xmpp",
|
BridgeName: "xmpp",
|
||||||
BridgeRoomID: roomJID,
|
BridgeChannelID: roomJID,
|
||||||
UserID: args.UserId,
|
UserID: args.UserId,
|
||||||
TeamID: args.TeamId,
|
TeamID: args.TeamId,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = c.bridgeManager.CreateChannelMapping(mappingReq)
|
err = c.bridgeManager.CreateChannelMapping(mappingReq)
|
||||||
|
@ -292,7 +292,7 @@ func (c *Handler) formatMappingError(operation, roomJID string, err error) *mode
|
||||||
case strings.Contains(errorMsg, "already mapped to channel"):
|
case strings.Contains(errorMsg, "already mapped to channel"):
|
||||||
return &model.CommandResponse{
|
return &model.CommandResponse{
|
||||||
ResponseType: model.CommandResponseTypeEphemeral,
|
ResponseType: model.CommandResponseTypeEphemeral,
|
||||||
Text: fmt.Sprintf(`❌ **Room Already Mapped**
|
Text: fmt.Sprintf(`❌ **Channel Already Mapped**
|
||||||
|
|
||||||
The XMPP room **%s** is already connected to another channel.
|
The XMPP room **%s** is already connected to another channel.
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ The XMPP room **%s** is already connected to another channel.
|
||||||
case strings.Contains(errorMsg, "does not exist"):
|
case strings.Contains(errorMsg, "does not exist"):
|
||||||
return &model.CommandResponse{
|
return &model.CommandResponse{
|
||||||
ResponseType: model.CommandResponseTypeEphemeral,
|
ResponseType: model.CommandResponseTypeEphemeral,
|
||||||
Text: fmt.Sprintf(`❌ **Room Not Found**
|
Text: fmt.Sprintf(`❌ **Channel Not Found**
|
||||||
|
|
||||||
The XMPP room **%s** doesn't exist or isn't accessible.
|
The XMPP room **%s** doesn't exist or isn't accessible.
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@ const (
|
||||||
|
|
||||||
// CreateChannelMappingRequest contains information needed to create a channel mapping
|
// CreateChannelMappingRequest contains information needed to create a channel mapping
|
||||||
type CreateChannelMappingRequest struct {
|
type CreateChannelMappingRequest struct {
|
||||||
ChannelID string // Mattermost channel ID
|
ChannelID string // Mattermost channel ID
|
||||||
BridgeName string // Name of the bridge (e.g., "xmpp")
|
BridgeName string // Name of the bridge (e.g., "xmpp")
|
||||||
BridgeRoomID string // Remote room/channel ID (e.g., JID for XMPP)
|
BridgeChannelID string // Remote room/channel ID (e.g., JID for XMPP)
|
||||||
UserID string // ID of user who triggered the mapping creation
|
UserID string // ID of user who triggered the mapping creation
|
||||||
TeamID string // Team ID where the channel belongs
|
TeamID string // Team ID where the channel belongs
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate checks if all required fields are present and valid
|
// Validate checks if all required fields are present and valid
|
||||||
|
@ -35,8 +35,8 @@ func (r CreateChannelMappingRequest) Validate() error {
|
||||||
if r.BridgeName == "" {
|
if r.BridgeName == "" {
|
||||||
return fmt.Errorf("bridgeName cannot be empty")
|
return fmt.Errorf("bridgeName cannot be empty")
|
||||||
}
|
}
|
||||||
if r.BridgeRoomID == "" {
|
if r.BridgeChannelID == "" {
|
||||||
return fmt.Errorf("bridgeRoomID cannot be empty")
|
return fmt.Errorf("bridgeChannelID cannot be empty")
|
||||||
}
|
}
|
||||||
if r.UserID == "" {
|
if r.UserID == "" {
|
||||||
return fmt.Errorf("userID cannot be empty")
|
return fmt.Errorf("userID cannot be empty")
|
||||||
|
@ -132,13 +132,13 @@ type Bridge interface {
|
||||||
// Stop stops the bridge
|
// Stop stops the bridge
|
||||||
Stop() error
|
Stop() error
|
||||||
|
|
||||||
// CreateChannelMapping creates a mapping between a Mattermost channel ID and an bridge room ID.
|
// CreateChannelMapping creates a mapping between a Mattermost channel ID and a bridge channel ID.
|
||||||
CreateChannelMapping(channelID, roomJID string) error
|
CreateChannelMapping(channelID, roomJID string) error
|
||||||
|
|
||||||
// GetChannelMapping retrieves the bridge room ID for a given Mattermost channel ID.
|
// GetChannelMapping retrieves the bridge channel ID for a given Mattermost channel ID.
|
||||||
GetChannelMapping(channelID string) (string, error)
|
GetChannelMapping(channelID string) (string, error)
|
||||||
|
|
||||||
// DeleteChannelMapping removes a mapping between a Mattermost channel ID and a bridge room ID.
|
// DeleteChannelMapping removes a mapping between a Mattermost channel ID and a bridge channel ID.
|
||||||
DeleteChannelMapping(channelID string) error
|
DeleteChannelMapping(channelID string) error
|
||||||
|
|
||||||
// ChannelMappingExists checks if a room/channel exists on the remote service.
|
// ChannelMappingExists checks if a room/channel exists on the remote service.
|
||||||
|
|
|
@ -30,8 +30,8 @@ type BridgeMessage struct {
|
||||||
ThreadID string // Thread/reply ID (if applicable)
|
ThreadID string // Thread/reply ID (if applicable)
|
||||||
|
|
||||||
// Routing hints
|
// Routing hints
|
||||||
TargetBridges []string // Which bridges should receive this
|
TargetBridges []string // Which bridges should receive this
|
||||||
Metadata map[string]any // Bridge-specific metadata
|
Metadata map[string]any // Bridge-specific metadata
|
||||||
}
|
}
|
||||||
|
|
||||||
// DirectionalMessage wraps a BridgeMessage with direction information
|
// DirectionalMessage wraps a BridgeMessage with direction information
|
||||||
|
|
|
@ -7,72 +7,17 @@ import "strings"
|
||||||
// to ensure consistency and avoid key conflicts.
|
// to ensure consistency and avoid key conflicts.
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// CurrentKVStoreVersion is the current version requiring migrations
|
|
||||||
CurrentKVStoreVersion = 2
|
|
||||||
// KeyPrefixXMPPUser is the prefix for XMPP user ID -> Mattermost user ID mappings
|
|
||||||
KeyPrefixXMPPUser = "xmpp_user_"
|
|
||||||
// KeyPrefixMattermostUser is the prefix for Mattermost user ID -> XMPP user ID mappings
|
|
||||||
KeyPrefixMattermostUser = "mattermost_user_"
|
|
||||||
|
|
||||||
// KeyPrefixChannelMap is the prefix for bridge-agnostic channel mappings
|
// KeyPrefixChannelMap is the prefix for bridge-agnostic channel mappings
|
||||||
KeyPrefixChannelMap = "channel_map_"
|
KeyPrefixChannelMap = "channel_map_"
|
||||||
|
|
||||||
// KeyPrefixGhostUser is the prefix for Mattermost user ID -> XMPP ghost user ID cache
|
|
||||||
KeyPrefixGhostUser = "ghost_user_"
|
|
||||||
// KeyPrefixGhostRoom is the prefix for ghost user room membership tracking
|
|
||||||
KeyPrefixGhostRoom = "ghost_room_"
|
|
||||||
|
|
||||||
// KeyPrefixXMPPEventPost is the prefix for XMPP event ID -> Mattermost post ID mappings
|
|
||||||
KeyPrefixXMPPEventPost = "xmpp_event_post_"
|
|
||||||
// KeyPrefixXMPPReaction is the prefix for XMPP reaction event ID -> reaction info mappings
|
|
||||||
KeyPrefixXMPPReaction = "xmpp_reaction_"
|
|
||||||
|
|
||||||
// KeyStoreVersion is the key for tracking the current KV store schema version
|
|
||||||
KeyStoreVersion = "kv_store_version"
|
|
||||||
|
|
||||||
// KeyPrefixLegacyDMMapping was the old prefix for DM mappings
|
|
||||||
KeyPrefixLegacyDMMapping = "dm_mapping_"
|
|
||||||
// KeyPrefixLegacyXMPPDMMapping was the old prefix for XMPP DM mappings
|
|
||||||
KeyPrefixLegacyXMPPDMMapping = "xmpp_dm_mapping_"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Helper functions for building KV store keys
|
// Helper functions for building KV store keys
|
||||||
|
|
||||||
// BuildXMPPUserKey creates a key for XMPP user -> Mattermost user mapping
|
|
||||||
func BuildXMPPUserKey(xmppUserID string) string {
|
|
||||||
return KeyPrefixXMPPUser + xmppUserID
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildMattermostUserKey creates a key for Mattermost user -> XMPP user mapping
|
|
||||||
func BuildMattermostUserKey(mattermostUserID string) string {
|
|
||||||
return KeyPrefixMattermostUser + mattermostUserID
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildChannelMapKey creates a bridge-agnostic key for channel mappings
|
// BuildChannelMapKey creates a bridge-agnostic key for channel mappings
|
||||||
func BuildChannelMapKey(bridgeName, identifier string) string {
|
func BuildChannelMapKey(bridgeName, identifier string) string {
|
||||||
return KeyPrefixChannelMap + bridgeName + "_" + identifier
|
return KeyPrefixChannelMap + bridgeName + "_" + identifier
|
||||||
}
|
}
|
||||||
|
|
||||||
// BuildGhostUserKey creates a key for ghost user cache
|
|
||||||
func BuildGhostUserKey(mattermostUserID string) string {
|
|
||||||
return KeyPrefixGhostUser + mattermostUserID
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildGhostRoomKey creates a key for ghost user room membership
|
|
||||||
func BuildGhostRoomKey(mattermostUserID, roomID string) string {
|
|
||||||
return KeyPrefixGhostRoom + mattermostUserID + "_" + roomID
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildXMPPEventPostKey creates a key for XMPP event -> post mapping
|
|
||||||
func BuildXMPPEventPostKey(xmppEventID string) string {
|
|
||||||
return KeyPrefixXMPPEventPost + xmppEventID
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildXMPPReactionKey creates a key for XMPP reaction storage
|
|
||||||
func BuildXMPPReactionKey(reactionEventID string) string {
|
|
||||||
return KeyPrefixXMPPReaction + reactionEventID
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractIdentifierFromChannelMapKey extracts the identifier from a bridge-agnostic channel map key
|
// ExtractIdentifierFromChannelMapKey extracts the identifier from a bridge-agnostic channel map key
|
||||||
func ExtractIdentifierFromChannelMapKey(key, bridgeName string) string {
|
func ExtractIdentifierFromChannelMapKey(key, bridgeName string) string {
|
||||||
expectedPrefix := KeyPrefixChannelMap + bridgeName + "_"
|
expectedPrefix := KeyPrefixChannelMap + bridgeName + "_"
|
||||||
|
|
|
@ -155,7 +155,6 @@ func (c *Client) SetServerDomain(domain string) {
|
||||||
|
|
||||||
// Connect establishes connection to the XMPP server
|
// Connect establishes connection to the XMPP server
|
||||||
func (c *Client) Connect() error {
|
func (c *Client) Connect() error {
|
||||||
|
|
||||||
if c.session != nil {
|
if c.session != nil {
|
||||||
return nil // Already connected
|
return nil // Already connected
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue