FEP-1970: implementation WIP:

Adding the data on outgoing objects.

Related to #113.
This commit is contained in:
John Livingston
2023-07-04 18:07:59 +02:00
parent abed34ec07
commit f7e7cddf72
4 changed files with 68 additions and 10 deletions

View File

@ -1,6 +1,7 @@
import type { RegisterServerOptions } from '@peertube/peertube-types'
import type { RegisterServerOptions, VideoObject } from '@peertube/peertube-types'
import { getBaseRouterRoute, getBaseWebSocketRoute } from '../helpers'
import { canonicalizePluginUri } from './canonicalize'
export function getBoshUri (options: RegisterServerOptions): string {
return getBaseRouterRoute(options) + 'http-bind'
@ -17,3 +18,10 @@ export function getWSS2SUri (options: RegisterServerOptions): string | undefined
if (base === undefined) { return undefined }
return base + 'xmpp-websocket-s2s'
}
export function getPublicChatUri (options: RegisterServerOptions, video: VideoObject): string {
const url = getBaseRouterRoute(options) + 'webchat/room/' + encodeURIComponent(video.uuid)
return canonicalizePluginUri(options, url, {
removePluginVersion: true
})
}