pushbits/tests/mockups/dispatcher.go
2021-06-11 10:13:17 +02:00

17 lines
456 B
Go

package mockups
import (
"github.com/pushbits/server/internal/configuration"
"github.com/pushbits/server/internal/dispatcher"
)
// GetMatrixDispatcher creates and returns a matrix dispatcher
func GetMatrixDispatcher(homeserver, username, password string) (*dispatcher.Dispatcher, error) {
db, err := GetEmptyDatabase()
if err != nil {
return nil, err
}
return dispatcher.Create(db, homeserver, username, password, configuration.Formatting{})
}