diff --git a/examples/timeline-with-streaming.ts b/examples/timeline-with-streaming.ts index 09f769bf..8acf4950 100644 --- a/examples/timeline-with-streaming.ts +++ b/examples/timeline-with-streaming.ts @@ -6,10 +6,7 @@ const subscribe = async (): Promise => { accessToken: "", }); - using events = masto.hashtag.subscribe({ tag: "mastojs" }); - console.log("subscribed to #mastojs"); - - for await (const event of events) { + for await (const event of masto.hashtag.subscribe({ tag: "mastojs" })) { switch (event.event) { case "update": { console.log("new post", event.payload.content);