FEP-1970: implementation WIP:
Adding the data on outgoing objects. Related to #113.
This commit is contained in:
@ -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
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user