Skip to content

Commit

Permalink
Add missing makePresentationType
Browse files Browse the repository at this point in the history
  • Loading branch information
MTRNord committed Oct 24, 2023
1 parent 7dd0a86 commit 5f3c400
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/commands/QueryAdminDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ import { Permalinks, UserID, getRequestFn } from "matrix-bot-sdk";
import { MjolnirContext } from "./CommandHandler";
import { CommandError, CommandResult } from "./interface-manager/Validation";
import { defineInterfaceCommand, findTableCommand } from "./interface-manager/InterfaceCommand";
import { findPresentationType, parameters, ParsedKeywords, union } from "./interface-manager/ParameterParsing";
import { findPresentationType, makePresentationType, parameters, ParsedKeywords, simpleTypeValidator, union } from "./interface-manager/ParameterParsing";
import "./interface-manager/MatrixPresentations";
import { JSXFactory } from "./interface-manager/JSXFactory";
import { defineMatrixInterfaceAdaptor } from "./interface-manager/MatrixInterfaceAdaptor";
import { renderMatrixAndSend } from "./interface-manager/DeadDocumentMatrix";
import { DocumentNode } from "./interface-manager/DeadDocument";
import { ReadItem } from "./interface-manager/CommandReader";

export type MatrixHomeserver = string;

makePresentationType({
name: "MatrixHomeserver",
// This is a very very crude way to detect a url.
validator: simpleTypeValidator("MatrixHomeserver", (readItem: ReadItem) => (readItem instanceof String) && (!readItem.includes('#') || !readItem.includes('!')) && !readItem.includes('.'))
})

interface SupportJson {
contacts?: {
matrix_id?: string,
Expand Down

0 comments on commit 5f3c400

Please sign in to comment.