diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2021-10-08 15:29:30 +0100 |
---|---|---|
committer | Neil Alexander <neilalexander@users.noreply.github.com> | 2021-10-08 15:29:30 +0100 |
commit | a5cb8c00bded571b98ca0827f3f9451557d53420 (patch) | |
tree | 9aeca601ea00d76e7ad1a677e634776bd936c774 /cmd/dendrite-demo-pinecone | |
parent | be9e1b536745e7e821f954239f832a309a88e67b (diff) |
Update Pinecone demo
Diffstat (limited to 'cmd/dendrite-demo-pinecone')
-rw-r--r-- | cmd/dendrite-demo-pinecone/main.go | 2 | ||||
-rw-r--r-- | cmd/dendrite-demo-pinecone/rooms/rooms.go | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/cmd/dendrite-demo-pinecone/main.go b/cmd/dendrite-demo-pinecone/main.go index 5f914680..7aa72632 100644 --- a/cmd/dendrite-demo-pinecone/main.go +++ b/cmd/dendrite-demo-pinecone/main.go @@ -91,7 +91,7 @@ func main() { } logger := log.New(os.Stdout, "", 0) - pRouter := pineconeRouter.NewRouter(logger, "dendrite", sk, pk, nil) + pRouter := pineconeRouter.NewRouter(logger, sk, "dendrite", nil) go func() { listener, err := net.Listen("tcp", *instanceListen) diff --git a/cmd/dendrite-demo-pinecone/rooms/rooms.go b/cmd/dendrite-demo-pinecone/rooms/rooms.go index ed6ab78c..fc387a17 100644 --- a/cmd/dendrite-demo-pinecone/rooms/rooms.go +++ b/cmd/dendrite-demo-pinecone/rooms/rooms.go @@ -50,11 +50,9 @@ func NewPineconeRoomProvider( } func (p *PineconeRoomProvider) Rooms() []gomatrixserverlib.PublicRoom { - known := p.r.KnownNodes() - //known = append(known, p.s.Sessions()...) list := []gomatrixserverlib.ServerName{} - for _, k := range known { - list = append(list, gomatrixserverlib.ServerName(k.String())) + for _, k := range p.r.Peers() { + list = append(list, gomatrixserverlib.ServerName(k.PublicKey)) } return bulkFetchPublicRoomsFromServers(context.Background(), p.fedClient, list) } |