mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 03:17:38 -07:00
[mastodon-client] Improve streaming api isMastodon check
This commit is contained in:
parent
878970d318
commit
a0adea70f5
1 changed files with 1 additions and 4 deletions
|
@ -53,10 +53,7 @@ export const initializeStreamingServer = (server: http.Server) => {
|
|||
const host = `https://${request.host}`;
|
||||
const prepareStream = q.stream?.toString();
|
||||
|
||||
const isMastodon = request.resourceURL.pathname?.endsWith('/api/v1/streaming');
|
||||
if (isMastodon && !request.resourceURL.pathname?.startsWith('/mastodon')) {
|
||||
streamingLogger.warn(`Received connect from mastodon on incorrect path: ${request.resourceURL.pathname}`);
|
||||
}
|
||||
const isMastodon = request.resourceURL.pathname?.startsWith('/api/v1/streaming');
|
||||
|
||||
const main = isMastodon
|
||||
? new MastodonStreamingConnection(connection, ev, user, app, q)
|
||||
|
|
Loading…
Reference in a new issue