[backend] Correctly return selected protocol for streaming API

This fixes compatibility with mastodon webclients in Google Chrome & derivatives
This commit is contained in:
Laura Hausmann 2023-10-12 17:32:25 +02:00
parent 06abf64594
commit ef98c86958
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -40,7 +40,7 @@ export const initializeStreamingServer = (server: http.Server) => {
return;
}
const connection = request.accept();
const connection = request.accept(request.requestedProtocols[0] ?? undefined);
const ev = new EventEmitter();