2021-02-14 10:57:35 +03:00
|
|
|
exports.runQuery = function (roomId, event, userInput) {
|
|
|
|
axios({
|
|
|
|
method: 'POST',
|
2024-09-29 20:53:07 +03:00
|
|
|
url: `https://${fediverse.auth[event.getSender()].domain}/api/v1/statuses/${userInput}/unreblog`,
|
|
|
|
headers: { Authorization: `Bearer ${fediverse.auth[event.getSender()].access_token}` },
|
2021-02-14 10:57:35 +03:00
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
matrix.utils.addReact(event, '✅');
|
|
|
|
})
|
|
|
|
.catch((e) => {
|
|
|
|
matrix.utils.addReact(event, '❌');
|
|
|
|
matrix.utils.sendError(event, roomId, e);
|
|
|
|
});
|
|
|
|
};
|