refactor(all): prefer token-based authentication

This commit is contained in:
vulet 2021-01-17 17:58:02 +08:00
parent 9e17440abc
commit f69b52261a
24 changed files with 166 additions and 117 deletions

View file

@ -4,9 +4,9 @@ exports.runQuery = function (matrixClient, room, userInput, registrar) {
axios({
method: 'POST',
url: `${registrar.config.fediverse.domain}/api/v1/statuses`,
headers: { Authorization: `Bearer ${registrar.config.fediverse.token}` },
data: {
status: `@mordekai ${userInput}`,
headers: { Authorization: `Bearer ${registrar.fediverse_auth.access_token}` },
data: {
status: `@mordekai ${userInput}`,
content_type: `text/markdown`,
visibility: 'unlisted',
expires_in: '7200'