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:
parent
0cd373fb8a
commit
67b88f9c96
28 changed files with 264 additions and 1413 deletions
|
@ -1,17 +1,15 @@
|
|||
const axios = require('axios');
|
||||
|
||||
exports.runQuery = function (matrixClient, room, userInput, registrar) {
|
||||
axios.get(`${registrar.config.fediverse.domain}/api/v1/accounts/${userInput}`).then((findUID) => {
|
||||
exports.runQuery = function (matrixClient, room, userInput) {
|
||||
axios.get(`${config.fediverse.domain}/api/v1/accounts/${userInput}`).then((findUID) => {
|
||||
axios({
|
||||
method: 'POST',
|
||||
url: `${registrar.config.fediverse.domain}/api/v1/accounts/${findUID.data.id}/unfollow`,
|
||||
headers: { Authorization: `Bearer ${registrar.fediverse_auth.access_token}` },
|
||||
url: `${config.fediverse.domain}/api/v1/accounts/${findUID.data.id}/unfollow`,
|
||||
headers: { Authorization: `Bearer ${fediverse_auth.access_token}` },
|
||||
})
|
||||
.then((response) => {
|
||||
matrixClient.sendHtmlNotice(room.roomId,
|
||||
'',
|
||||
`Unsubscribed:
|
||||
<blockquote>${registrar.config.fediverse.domain}/${response.data.id}`);
|
||||
<blockquote>${config.fediverse.domain}/${response.data.id}`);
|
||||
});
|
||||
}).catch((e) => {
|
||||
matrixClient.sendHtmlNotice(room.roomId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue