refactor: improve superchat UI and gift membership handling

This commit is contained in:
Yusuf İpek
2025-10-05 23:41:32 +03:00
parent f1dd130bc0
commit e8f42a5676
5 changed files with 161 additions and 54 deletions
+1 -3
View File
@@ -9,7 +9,7 @@ const MAX_MESSAGES = 500;
export async function startBackend() {
const fastify = Fastify({
logger: {
level: 'info'
level: 'warn', // Only show warnings and errors, not every request
}
});
@@ -38,7 +38,6 @@ export async function startBackend() {
ingestion = await bootstrapInnertube(parsedLiveId);
console.log(`[Backend] ✓ YouTube chat connected successfully`);
ingestion.emitter.on('message', (message) => {
console.log(`[Chat] ${message.author}: ${message.text}`);
store.push(message);
if (store.length > MAX_MESSAGES) {
store.splice(0, store.length - MAX_MESSAGES);
@@ -106,7 +105,6 @@ export async function startBackend() {
console.log(`[Backend] ✓ YouTube chat connected successfully`);
ingestion.emitter.on('message', (message) => {
console.log(`[Chat] ${message.author}: ${message.text}`);
store.push(message);
if (store.length > MAX_MESSAGES) {
store.splice(0, store.length - MAX_MESSAGES);