add coloring option for title

This commit is contained in:
Cubicroot 2021-05-02 12:27:13 +02:00
parent 567c814968
commit fe1cbdf79e
7 changed files with 102 additions and 24 deletions

View file

@ -16,12 +16,13 @@ type Database interface {
// Dispatcher holds information for sending notifications to clients.
type Dispatcher struct {
db Database
client *gomatrix.Client
db Database
client *gomatrix.Client
settings map[string]interface{}
}
// Create instanciates a dispatcher connection.
func Create(db Database, homeserver, username, password string) (*Dispatcher, error) {
func Create(db Database, homeserver, username, password string, settings map[string]interface{}) (*Dispatcher, error) {
log.Println("Setting up dispatcher.")
client, err := gomatrix.NewClient(homeserver, "", "")
@ -40,7 +41,7 @@ func Create(db Database, homeserver, username, password string) (*Dispatcher, er
client.SetCredentials(response.UserID, response.AccessToken)
return &Dispatcher{client: client}, nil
return &Dispatcher{client: client, settings: settings}, nil
}
// Close closes the dispatcher connection.