mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
User directory for nearby Pinecone peers (P2P demo) (#2311)
* User directory for nearby Pinecone peers * Fix mux routing * Use config to determine which server notices user to exclude
This commit is contained in:
parent
0692be44d9
commit
7972915806
18 changed files with 226 additions and 37 deletions
|
@ -30,7 +30,7 @@ import (
|
|||
)
|
||||
|
||||
// NewDatabase creates a new accounts and profiles database
|
||||
func NewDatabase(dbProperties *config.DatabaseOptions, serverName gomatrixserverlib.ServerName, bcryptCost int, openIDTokenLifetimeMS int64, loginTokenLifetime time.Duration) (*shared.Database, error) {
|
||||
func NewDatabase(dbProperties *config.DatabaseOptions, serverName gomatrixserverlib.ServerName, bcryptCost int, openIDTokenLifetimeMS int64, loginTokenLifetime time.Duration, serverNoticesLocalpart string) (*shared.Database, error) {
|
||||
db, err := sqlutil.Open(dbProperties)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -77,7 +77,7 @@ func NewDatabase(dbProperties *config.DatabaseOptions, serverName gomatrixserver
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("NewPostgresOpenIDTable: %w", err)
|
||||
}
|
||||
profilesTable, err := NewPostgresProfilesTable(db)
|
||||
profilesTable, err := NewPostgresProfilesTable(db, serverNoticesLocalpart)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("NewPostgresProfilesTable: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue