func (c *Clients) Update(config api.ClientConfig) (api.ClientConfig, error) {
	_, old, err := c.updateClientInDB(config)
	return old.config, err
}
Update updates the config for a matrix client
package clients
import (
	"database/sql"
	"fmt"
	"net/http"
	"reflect"
	"strings"
	"sync"
	"github.com/matrix-org/go-neb/api"
	"github.com/matrix-org/go-neb/database"
	"github.com/matrix-org/go-neb/matrix"
	"github.com/matrix-org/go-neb/metrics"
	"github.com/matrix-org/go-neb/types"
	shellwords "github.com/mattn/go-shellwords"
	log "github.com/sirupsen/logrus"
	"maunium.net/go/mautrix"
	mevt "maunium.net/go/mautrix/event"
	"maunium.net/go/mautrix/id"
)
type Clients struct {
	db         database.Storer
	httpClient *http.Client
	dbMutex    sync.Mutex
	mapMutex   sync.Mutex
	clients    map[id.UserID]BotClient
}
func New(db database.Storer, cli *http.Client) *Clients {
	clients := &Clients{
		db:         db,
		httpClient: cli,
		clients:    make(map[id.UserID]BotClient),  
	}
	return clients
}
func (c *Clients) Client(userID id.UserID) (*BotClient, error) {
	entry := c.getClient(userID)
	if entry.Client != nil {
		return &entry, nil
	}
	entry, err := c.loadClientFromDB(userID)
	return &entry, err
}