diff options
Diffstat (limited to 'appservice/account.go')
-rw-r--r-- | appservice/account.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/appservice/account.go b/appservice/account.go index 013a420..e507230 100644 --- a/appservice/account.go +++ b/appservice/account.go @@ -25,6 +25,7 @@ func AddAccount(a *Account) { registeredAccounts[a.MatrixUser] = make(map[string]*Account) } registeredAccounts[a.MatrixUser][a.AccountName] = a + ezbrSystemSendf(a.MatrixUser, "Connecting to account %s (%s)", a.AccountName, a.Protocol) } func FindAccount(mxUser string, name string) *Account { @@ -104,9 +105,13 @@ func (a *Account) leftInternal(roomId RoomID) error { return err } - log.Printf("Joined %s (%s)\n", roomId, a.MatrixUser) + log.Printf("Left %s (%s)\n", roomId, a.MatrixUser) - return mxRoomKick(mx_room_id, a.MatrixUser, fmt.Sprintf("got leave room event on %s", a.Protocol)) + err = mxRoomKick(mx_room_id, a.MatrixUser, fmt.Sprintf("got leave room event on %s", a.Protocol)) + if err != nil && strings.Contains(err.Error(), "not in the room") { + err = nil + } + return err } // ---- |