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