Don't use // and [] in the output for i//

This commit is contained in:
Daniel Løvbrøtte Olsen 2019-03-01 01:31:30 +01:00
parent 2f999368a3
commit 7c7f7bff0f
2 changed files with 3 additions and 5 deletions

View File

@ -1,16 +1,13 @@
const version = "2.0.1"; const version = "2.0.2";
import x2i from "./x2i"; import x2i from "./x2i";
import { existsSync } from "fs"; import { existsSync } from "fs";
const config = (existsSync("./config.json")) ? require("./config.json") : {}; 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 MatrixClient = require("matrix-bot-sdk").MatrixClient;
const AutojoinRoomsMixin = require("matrix-bot-sdk").AutojoinRoomsMixin; 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 token = (config.token || process.env.WUG_TOKEN || process.env.MATRIXDEV_TOKEN);
const client = new MatrixClient(homeserver, token); const client = new MatrixClient(homeserver, token);

View File

@ -48,6 +48,7 @@ const matchType: { [key: string]: IMatchInstructions } = {
keys: readKeys("./x2i/z2i-keys.yaml"), keys: readKeys("./x2i/z2i-keys.yaml"),
}, },
i: { i: {
join: (_, match) => `|${match}|`,
keys: readKeys("./x2i/i-keys.yaml"), keys: readKeys("./x2i/i-keys.yaml"),
}, },
}; };