15 lines
432 B
JavaScript
15 lines
432 B
JavaScript
|
exports.runQuery = function (roomId, event, userInput) {
|
||
|
axios({
|
||
|
method: 'POST',
|
||
|
url: `${config.fediverse.domain}/api/v1/statuses/${userInput}/unreblog`,
|
||
|
headers: { Authorization: `Bearer ${fediverse.auth.access_token}` },
|
||
|
})
|
||
|
.then(() => {
|
||
|
matrix.utils.addReact(event, '✅');
|
||
|
})
|
||
|
.catch((e) => {
|
||
|
matrix.utils.addReact(event, '❌');
|
||
|
matrix.utils.sendError(event, roomId, e);
|
||
|
});
|
||
|
};
|