aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-07-23 16:41:36 +0100
committerGitHub <noreply@github.com>2020-07-23 16:41:36 +0100
commit98f2f09bb46f8bd126214f7874065d6b311bdeba (patch)
tree89108a41fe96e5d0a6dbd4f1d5e91c0b5263fc2e /internal
parent7b862384a779f067f07ffeb2151856f89d372732 (diff)
keyserver: produce key change events (#1218)
* Produce kafka events when keys are added * Consume key changes in syncapi with TODO markers for handling them and catching up * unbreak tests * Linting
Diffstat (limited to 'internal')
-rw-r--r--internal/config/config.go4
-rw-r--r--internal/config/config_test.go2
2 files changed, 6 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 6a29f52b..657e804f 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -159,6 +159,8 @@ type Dendrite struct {
OutputTypingEvent Topic `yaml:"output_typing_event"`
// Topic for eduserver/api.OutputSendToDeviceEvent events.
OutputSendToDeviceEvent Topic `yaml:"output_send_to_device_event"`
+ // Topic for keyserver when new device keys are added.
+ OutputKeyChangeEvent Topic `yaml:"output_key_change_event"`
}
} `yaml:"kafka"`
@@ -603,6 +605,8 @@ func (config *Dendrite) checkKafka(configErrs *configErrors, monolithic bool) {
checkNotEmpty(configErrs, "kafka.topics.output_room_event", string(config.Kafka.Topics.OutputRoomEvent))
checkNotEmpty(configErrs, "kafka.topics.output_client_data", string(config.Kafka.Topics.OutputClientData))
checkNotEmpty(configErrs, "kafka.topics.output_typing_event", string(config.Kafka.Topics.OutputTypingEvent))
+ checkNotEmpty(configErrs, "kafka.topics.output_send_to_device_event", string(config.Kafka.Topics.OutputSendToDeviceEvent))
+ checkNotEmpty(configErrs, "kafka.topics.output_key_change_event", string(config.Kafka.Topics.OutputKeyChangeEvent))
}
// checkDatabase verifies the parameters database.* are valid.
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index 6b819872..758d7552 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -46,6 +46,8 @@ kafka:
output_room_event: output.room
output_client_data: output.client
output_typing_event: output.typing
+ output_send_to_device_event: output.std
+ output_key_change_event: output.key_change
user_updates: output.user
database:
media_api: "postgresql:///media_api"