mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 13:52:46 +00:00
Remove ServerACLs from the current state server (#1390)
* Remove ServerACLs from the current state server Functionality moved to roomserver * Nothing to see here, move along
This commit is contained in:
parent
f1a98e1193
commit
2570418f42
17 changed files with 43 additions and 421 deletions
|
@ -19,7 +19,6 @@ import (
|
|||
"encoding/json"
|
||||
|
||||
"github.com/Shopify/sarama"
|
||||
"github.com/matrix-org/dendrite/currentstateserver/acls"
|
||||
"github.com/matrix-org/dendrite/currentstateserver/storage"
|
||||
"github.com/matrix-org/dendrite/internal"
|
||||
"github.com/matrix-org/dendrite/roomserver/api"
|
||||
|
@ -31,10 +30,9 @@ import (
|
|||
type OutputRoomEventConsumer struct {
|
||||
rsConsumer *internal.ContinualConsumer
|
||||
db storage.Database
|
||||
acls *acls.ServerACLs
|
||||
}
|
||||
|
||||
func NewOutputRoomEventConsumer(topicName string, kafkaConsumer sarama.Consumer, store storage.Database, acls *acls.ServerACLs) *OutputRoomEventConsumer {
|
||||
func NewOutputRoomEventConsumer(topicName string, kafkaConsumer sarama.Consumer, store storage.Database) *OutputRoomEventConsumer {
|
||||
consumer := &internal.ContinualConsumer{
|
||||
ComponentName: "currentstateserver/roomserver",
|
||||
Topic: topicName,
|
||||
|
@ -44,7 +42,6 @@ func NewOutputRoomEventConsumer(topicName string, kafkaConsumer sarama.Consumer,
|
|||
s := &OutputRoomEventConsumer{
|
||||
rsConsumer: consumer,
|
||||
db: store,
|
||||
acls: acls,
|
||||
}
|
||||
consumer.ProcessMessage = s.onMessage
|
||||
|
||||
|
@ -80,10 +77,6 @@ func (c *OutputRoomEventConsumer) onNewRoomEvent(
|
|||
) error {
|
||||
ev := msg.Event
|
||||
|
||||
if ev.Type() == "m.room.server_acl" && ev.StateKeyEquals("") {
|
||||
defer c.acls.OnServerACLUpdate(&ev.Event)
|
||||
}
|
||||
|
||||
addsStateEvents := msg.AddsState()
|
||||
|
||||
ev, err := c.updateStateEvent(ev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue