aboutsummaryrefslogtreecommitdiff
path: root/setup/jetstream
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-12-12 12:13:55 +0100
committerGitHub <noreply@github.com>2023-12-12 12:13:55 +0100
commit1555b3542d7da8243abc21e6a29758ebe419e5b5 (patch)
treefb717176258a440eb05d4101338fba867b62210e /setup/jetstream
parent185ad6b00de8079fb6a638ed63e392dfe9f2b49f (diff)
Introduce a new stream for the appservice consumer (#3277)
This introduces a new stream the syncAPI produces to once it processed a `OutputRoomEvent` and the appservices consumes. This is to work around a race condition where appservices receive an event before the syncAPI has handled it, this can result in e.g. calls to `/joined_members` returning a wrong membership list.
Diffstat (limited to 'setup/jetstream')
-rw-r--r--setup/jetstream/streams.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/setup/jetstream/streams.go b/setup/jetstream/streams.go
index 74140792..1dc9f4ce 100644
--- a/setup/jetstream/streams.go
+++ b/setup/jetstream/streams.go
@@ -20,6 +20,7 @@ var (
InputDeviceListUpdate = "InputDeviceListUpdate"
InputSigningKeyUpdate = "InputSigningKeyUpdate"
OutputRoomEvent = "OutputRoomEvent"
+ OutputAppserviceEvent = "OutputAppserviceEvent"
OutputSendToDeviceEvent = "OutputSendToDeviceEvent"
OutputKeyChangeEvent = "OutputKeyChangeEvent"
OutputTypingEvent = "OutputTypingEvent"
@@ -66,6 +67,11 @@ var streams = []*nats.StreamConfig{
Storage: nats.FileStorage,
},
{
+ Name: OutputAppserviceEvent,
+ Retention: nats.InterestPolicy,
+ Storage: nats.FileStorage,
+ },
+ {
Name: OutputSendToDeviceEvent,
Retention: nats.InterestPolicy,
Storage: nats.FileStorage,