feat(e2ee): introduce OLM encryption. refactor(storage): moved from fs to localstorage. refactor(config): added as global to registrar. chore(npm): upgraded matrix-js-sdk from 2.4.6 release to 9.5.1 release.

This commit is contained in:
vulet 2021-02-01 16:58:59 +08:00
parent 0cd373fb8a
commit 67b88f9c96
28 changed files with 264 additions and 1413 deletions

View file

@ -1,10 +1,8 @@
const axios = require('axios');
exports.runQuery = function (matrixClient, room, userInput, registrar) {
exports.runQuery = function (matrixClient, room, userInput) {
axios({
method: 'POST',
url: `${registrar.config.fediverse.domain}/api/v1/statuses`,
headers: { Authorization: `Bearer ${registrar.fediverse_auth.access_token}` },
url: `${config.fediverse.domain}/api/v1/statuses`,
headers: { Authorization: `Bearer ${fediverse_auth.access_token}` },
data: { status: userInput, content_type: `text/markdown` },
}).then((response) => {
matrixClient.sendHtmlNotice(room.roomId,