diff --git a/commands.go b/commands.go index f61ede7..7a90cc8 100644 --- a/commands.go +++ b/commands.go @@ -247,6 +247,9 @@ func (handler *CommandHandler) CommandLogin(ce *CommandEvent) { const cmdLogoutHelp = `logout - Logout from Skype` func (handler *CommandHandler) CommandLogout(ce *CommandEvent) { + if ce.User.Conn == nil { + return + } //ce.User.Conn.Conn.LogoutChan <- 1 ce.User.Conn.LoggedIn = false ce.User.Conn.LoginInfo = &skype.Session{ diff --git a/example-config.yaml b/example-config.yaml index 246a70e..6826da5 100644 --- a/example-config.yaml +++ b/example-config.yaml @@ -142,7 +142,7 @@ bridge: # Whether or not to explicitly set the avatar and room name for private # chat portal rooms. This can be useful if the previous field works fine, # but causes room avatar/name bugs. - private_chat_portal_meta: false + private_chat_portal_meta: true # Whether or not thumbnails from Skype should be sent. # They're disabled by default due to very low resolution. diff --git a/portal.go b/portal.go index 75234a7..d11633f 100644 --- a/portal.go +++ b/portal.go @@ -360,7 +360,7 @@ func (portal *Portal) handlePrivateChatFromMe(fromMe bool) func() { return func() { if privateChatPuppet != nil && privateChatPuppetInvited { - _, _ = privateChatPuppet.DefaultIntent().LeaveRoom(portal.MXID) + //_, _ = privateChatPuppet.DefaultIntent().LeaveRoom(portal.MXID) } } } @@ -908,7 +908,7 @@ func (portal *Portal) beginBackfill() func() { portal.privateChatBackfillInvitePuppet = nil portal.backfillLock.Unlock() if privateChatPuppet != nil && privateChatPuppetInvited { - _, _ = privateChatPuppet.DefaultIntent().LeaveRoom(portal.MXID) + //_, _ = privateChatPuppet.DefaultIntent().LeaveRoom(portal.MXID) } } }