Changing diagnostic functions arguments.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { newResult, TestResult } from './utils'
|
||||
|
||||
export async function diagBackend (test: string, _settingsManager: PluginSettingsManager): Promise<TestResult> {
|
||||
export async function diagBackend (test: string, _options: RegisterServerOptions): Promise<TestResult> {
|
||||
const result = newResult(test)
|
||||
result.label = 'Backend connection'
|
||||
result.ok = true
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { newResult, TestResult } from './utils'
|
||||
|
||||
export async function diagChatType (test: string, settingsManager: PluginSettingsManager): Promise<TestResult> {
|
||||
export async function diagChatType (test: string, { settingsManager }: RegisterServerOptions): Promise<TestResult> {
|
||||
const result = newResult(test)
|
||||
const typeSettings = await settingsManager.getSettings([
|
||||
'chat-use-prosody',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { newResult, TestResult } from './utils'
|
||||
|
||||
export async function diagConverse (test: string, settingsManager: PluginSettingsManager): Promise<TestResult> {
|
||||
export async function diagConverse (test: string, { settingsManager }: RegisterServerOptions): Promise<TestResult> {
|
||||
const result = newResult(test)
|
||||
result.label = 'Builtin ConverseJS on XMPP service'
|
||||
const builtinSettings = await settingsManager.getSettings([
|
||||
|
@ -6,21 +6,21 @@ import { diagProsody } from './prosody'
|
||||
import { diagUri } from './uri'
|
||||
import { diagVideo } from './video'
|
||||
|
||||
export async function diag (test: string, settingsManager: PluginSettingsManager): Promise<TestResult> {
|
||||
export async function diag (test: string, options: RegisterServerOptions): Promise<TestResult> {
|
||||
let result: TestResult
|
||||
|
||||
if (test === 'backend') {
|
||||
result = await diagBackend(test, settingsManager)
|
||||
result = await diagBackend(test, options)
|
||||
} else if (test === 'webchat-video') {
|
||||
result = await diagVideo(test, settingsManager)
|
||||
result = await diagVideo(test, options)
|
||||
} else if (test === 'webchat-type') {
|
||||
result = await diagChatType(test, settingsManager)
|
||||
result = await diagChatType(test, options)
|
||||
} else if (test === 'prosody') {
|
||||
result = await diagProsody(test, settingsManager)
|
||||
result = await diagProsody(test, options)
|
||||
} else if (test === 'converse') {
|
||||
result = await diagConverse(test, settingsManager)
|
||||
result = await diagConverse(test, options)
|
||||
} else if (test === 'use-uri') {
|
||||
result = await diagUri(test, settingsManager)
|
||||
result = await diagUri(test, options)
|
||||
} else {
|
||||
result = newResult(test)
|
||||
result.messages.push('Unknown test')
|
||||
|
@ -1,9 +1,7 @@
|
||||
import { newResult, TestResult } from './utils'
|
||||
|
||||
export async function diagProsody (test: string, _settingsManager: PluginSettingsManager): Promise<TestResult> {
|
||||
export async function diagProsody (test: string, _options: RegisterServerOptions): Promise<TestResult> {
|
||||
const result = newResult(test)
|
||||
result.ok = false
|
||||
result.label = 'Builtin Prosody and ConverseJS'
|
||||
result.messages.push('Not Implemented Yet')
|
||||
return result
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { newResult, TestResult } from './utils'
|
||||
|
||||
export async function diagUri (test: string, settingsManager: PluginSettingsManager): Promise<TestResult> {
|
||||
export async function diagUri (test: string, { settingsManager }: RegisterServerOptions): Promise<TestResult> {
|
||||
const result = newResult(test)
|
||||
result.label = 'External Webchat using an iframe'
|
||||
const settings = await settingsManager.getSettings([
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { newResult, TestResult } from './utils'
|
||||
|
||||
export async function diagVideo (test: string, settingsManager: PluginSettingsManager): Promise<TestResult> {
|
||||
export async function diagVideo (test: string, { settingsManager }: RegisterServerOptions): Promise<TestResult> {
|
||||
const result = newResult(test)
|
||||
result.label = 'Webchat activated on videos'
|
||||
const videoSettings = await settingsManager.getSettings([
|
||||
|
Reference in New Issue
Block a user