mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
[mastodon-client] Improve streaming api isMastodon check
This commit is contained in:
parent
878970d318
commit
a0adea70f5
@ -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 New Issue
Block a user