Chat federation: add metadata in ActivityPub. WIP
This commit is contained in:
13
server/lib/uri/webchat.ts
Normal file
13
server/lib/uri/webchat.ts
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
import type { RegisterServerOptions } from '@peertube/peertube-types'
|
||||
import { getBaseRouterRoute, getBaseWebSocketRoute } from '../helpers'
|
||||
|
||||
export function getBoshUri (options: RegisterServerOptions): string {
|
||||
return getBaseRouterRoute(options) + 'http-bind'
|
||||
}
|
||||
|
||||
export function getWSUri (options: RegisterServerOptions): string | undefined {
|
||||
const base = getBaseWebSocketRoute(options) // can be undefined if Peertube is too old
|
||||
if (base === undefined) { return undefined }
|
||||
return base + 'xmpp-websocket'
|
||||
}
|
Reference in New Issue
Block a user