Chat Federation: send the information to the frontend.

This commit is contained in:
John Livingston
2023-04-21 12:02:52 +02:00
parent b1f1271389
commit 333590defd
3 changed files with 73 additions and 9 deletions

View File

@ -7,7 +7,7 @@ import { prosodyCheckUserPassword, prosodyRegisterUser, prosodyUserRegistered }
import { getUserNickname } from '../helpers'
import { Affiliations, getVideoAffiliations, getChannelAffiliations } from '../prosody/config/affiliations'
import { getProsodyDomain } from '../prosody/config/domain'
import { fillVideoCustomFields } from '../custom-fields'
import { fillVideoCustomFields, fillVideoRemoteLiveChat } from '../custom-fields'
import { getChannelInfosById } from '../database/channel'
// See here for description: https://modules.prosody.im/mod_muc_http_defaults.html
@ -96,8 +96,9 @@ async function initApiRouter (options: RegisterServerOptions): Promise<Router> {
return
}
// Adding the custom fields:
// Adding the custom fields and data:
await fillVideoCustomFields(options, video)
if (video.remote) { await fillVideoRemoteLiveChat(options, video) }
// check settings (chat enabled for this video?)
const settings = await options.settingsManager.getSettings([