From 333590defd48f32803156ff24a1c5adf649903d8 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Fri, 21 Apr 2023 12:02:52 +0200 Subject: [PATCH] Chat Federation: send the information to the frontend. --- server/lib/custom-fields.ts | 27 +++++++++++++++-- server/lib/federation/storage.ts | 50 +++++++++++++++++++++++++++++--- server/lib/routers/api.ts | 5 ++-- 3 files changed, 73 insertions(+), 9 deletions(-) diff --git a/server/lib/custom-fields.ts b/server/lib/custom-fields.ts index 8d688b9b..eb491296 100644 --- a/server/lib/custom-fields.ts +++ b/server/lib/custom-fields.ts @@ -1,4 +1,6 @@ -import type { RegisterServerOptions, Video } from '@peertube/peertube-types' +import type { RegisterServerOptions, Video, MVideoThumbnail } from '@peertube/peertube-types' +import { getVideoLiveChatInfos } from './federation/storage' + async function initCustomFields (options: RegisterServerOptions): Promise { const registerHook = options.registerHook const storageManager = options.storageManager @@ -32,8 +34,11 @@ async function initCustomFields (options: RegisterServerOptions): Promise registerHook({ target: 'filter:api.video.get.result', handler: async (video: Video): Promise