Fix #14 make mastodon instance configurable
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { HASHTAG_FILTER, URL_FILTER, YOUTUBE_API_KEY } from '$env/static/private';
|
||||
import { HASHTAG_FILTER, MASTODON_INSTANCE, URL_FILTER, YOUTUBE_API_KEY } from '$env/static/private';
|
||||
import type { Post, Tag, TimelineEvent } from '$lib/mastodon/response';
|
||||
import { savePost } from '$lib/server/db';
|
||||
import { WebSocket } from "ws";
|
||||
@ -55,7 +55,7 @@ export class TimelineReader {
|
||||
}
|
||||
|
||||
private constructor() {
|
||||
const socket = new WebSocket("wss://metalhead.club/api/v1/streaming")
|
||||
const socket = new WebSocket(`wss://${MASTODON_INSTANCE}/api/v1/streaming`);
|
||||
socket.onopen = (_event) => {
|
||||
socket.send('{ "type": "subscribe", "stream": "public:local"}');
|
||||
};
|
||||
|
Reference in New Issue
Block a user