Merge branch 'main' into #24-switch-to-mautrix

This commit is contained in:
Cubicroot 2022-03-06 17:32:29 +01:00 committed by GitHub
commit dc6c76747f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 777 additions and 62 deletions

View file

@ -40,8 +40,12 @@ func Create(homeserver, username, password string, formatting configuration.Form
// Close closes the dispatcher connection.
func (d *Dispatcher) Close() {
log.Printf("Logging out.")
_, err := d.mautrixClient.Logout()
if err != nil {
log.Printf("Error while logging out: %s", err)
}
d.mautrixClient.Logout()
d.mautrixClient.ClearCredentials()
log.Printf("Successfully logged out.")