peertube-plugin-livechat/server/lib/diagnostic/utils.ts
John Livingston 7906ddf625
Prosody mode only:
Removing old modes (ConverseJS and External URI).
Work in progress.
2022-10-10 18:08:20 +02:00

28 lines
505 B
TypeScript

type nextValue = 'backend' | 'webchat-video' | 'prosody'
interface MessageWithLevel {
level: 'info' | 'warning' | 'error'
message: string
}
export interface TestResult {
label?: string
messages: Array<string | MessageWithLevel>
debug: Array<{
title: string
message: string
}>
next: nextValue | null
ok: boolean
test: string
}
export function newResult (test: string): TestResult {
return {
test: test,
ok: false,
messages: [],
debug: [],
next: null
}
}