diff --git a/cmd/soju/main.go b/cmd/soju/main.go index 2110131..5c34460 100644 --- a/cmd/soju/main.go +++ b/cmd/soju/main.go @@ -92,8 +92,8 @@ func loadConfig() (*config.Server, *soju.Config, error) { cfg := &soju.Config{ Hostname: raw.Hostname, Title: raw.Title, - LogDriver: raw.MsgStore.Driver, - LogPath: raw.MsgStore.Source, + MsgStoreDriver: raw.MsgStore.Driver, + MsgStorePath: raw.MsgStore.Source, HTTPOrigins: raw.HTTPOrigins, AcceptProxyIPs: raw.AcceptProxyIPs, MaxUserNetworks: raw.MaxUserNetworks, diff --git a/downstream.go b/downstream.go index 9538f95..aa0fc9c 100644 --- a/downstream.go +++ b/downstream.go @@ -382,7 +382,7 @@ func newDownstreamConn(srv *Server, ic ircConn, id uint64) *downstreamConn { // TODO: this is racy, we should only enable chathistory after // authentication and then check that user.msgStore implements // chatHistoryMessageStore - switch srv.Config().LogDriver { + switch srv.Config().MsgStoreDriver { case "fs", "db": dc.caps.Available["draft/chathistory"] = "" dc.caps.Available["soju.im/search"] = "" diff --git a/server.go b/server.go index 9abd2b1..ee729ee 100644 --- a/server.go +++ b/server.go @@ -138,8 +138,8 @@ func (ln *retryListener) Accept() (net.Conn, error) { type Config struct { Hostname string Title string - LogDriver string - LogPath string + MsgStoreDriver string + MsgStorePath string HTTPOrigins []string AcceptProxyIPs config.IPSet MaxUserNetworks int diff --git a/user.go b/user.go index 5548601..581433a 100644 --- a/user.go +++ b/user.go @@ -537,9 +537,9 @@ func newUser(srv *Server, record *database.User) *user { logger := &prefixLogger{srv.Logger, fmt.Sprintf("user %q: ", record.Username)} var msgStore msgstore.Store - switch srv.Config().LogDriver { + switch srv.Config().MsgStoreDriver { case "fs": - msgStore = msgstore.NewFSStore(srv.Config().LogPath, record) + msgStore = msgstore.NewFSStore(srv.Config().MsgStorePath, record) case "db": msgStore = msgstore.NewDBStore(srv.db) case "memory":