From 7c7f7bff0fbe22063f52f539a900d170b3f947aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Fri, 1 Mar 2019 01:31:30 +0100 Subject: [PATCH] Don't use // and [] in the output for i// --- index.ts | 7 ++----- x2i/index.ts | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/index.ts b/index.ts index eb90246..6b2889b 100644 --- a/index.ts +++ b/index.ts @@ -1,16 +1,13 @@ -const version = "2.0.1"; +const version = "2.0.2"; import x2i from "./x2i"; import { existsSync } from "fs"; const config = (existsSync("./config.json")) ? require("./config.json") : {}; -console.log(process.env.MATRIXDEV_HOMESERVER); -console.log(process.env.MATRIXDEV_TOKEN); - const MatrixClient = require("matrix-bot-sdk").MatrixClient; const AutojoinRoomsMixin = require("matrix-bot-sdk").AutojoinRoomsMixin; -const homeserver = (config.homeserver || process.env.WUG_HOMESERVER || process.env.MATRIXDEV_HOMESERVER); +const homeserver = (config.homeserver || process.env.WUG_HOMESERVER || process.env.MATRIXDEV_HOMESERVER); const token = (config.token || process.env.WUG_TOKEN || process.env.MATRIXDEV_TOKEN); const client = new MatrixClient(homeserver, token); diff --git a/x2i/index.ts b/x2i/index.ts index 580e9ee..dbb41ca 100644 --- a/x2i/index.ts +++ b/x2i/index.ts @@ -48,6 +48,7 @@ const matchType: { [key: string]: IMatchInstructions } = { keys: readKeys("./x2i/z2i-keys.yaml"), }, i: { + join: (_, match) => `|${match}|`, keys: readKeys("./x2i/i-keys.yaml"), }, };