diff --git a/src/api/helpers.js b/src/api/helpers.js index a7e1b624b..c9e2ed921 100644 --- a/src/api/helpers.js +++ b/src/api/helpers.js @@ -132,7 +132,11 @@ export const promisedRequest = async ({ ) } } catch (error) { - throw new Error(error, { url, options }, response) + throw new Error( + error, + { url, options }, + response, + ) } } diff --git a/src/api/public.js b/src/api/public.js index 12af848d7..4ef226972 100644 --- a/src/api/public.js +++ b/src/api/public.js @@ -122,8 +122,7 @@ const MASTODON_STATUS_CONTEXT_URL = (id) => `/api/v1/statuses/${id}/context` const MASTODON_STATUS_SOURCE_URL = (id) => `/api/v1/statuses/${id}/source` const MASTODON_STATUS_HISTORY_URL = (id) => `/api/v1/statuses/${id}/history` const MASTODON_USER_URL = '/api/v1/accounts' -const MASTODON_USER_LOOKUP_URL = ({ acct }) => - `/api/v1/accounts/lookup${paramsString({ acct })}` +const MASTODON_USER_LOOKUP_URL = ({ acct }) => `/api/v1/accounts/lookup${paramsString({ acct })}` const MASTODON_POLL_URL = (id = '') => `/api/v1/polls/${id}` const MASTODON_STATUS_FAVORITEDBY_URL = (id) => `/api/v1/statuses/${id}/favourited_by` diff --git a/src/services/errors/errors.js b/src/services/errors/errors.js index 00dfd3712..546554cf1 100644 --- a/src/services/errors/errors.js +++ b/src/services/errors/errors.js @@ -16,7 +16,7 @@ export function StatusCodeError(statusCode, body, options, response) { this.statusText = body.error.error || body.error this.details = JSON && JSON.stringify ? JSON.stringify(body) : body this.errorData = body.error - this.message = this.statusCode + ' - ' + this.statusText + this.message = statusCode + ' - ' + statusText this.error = body // legacy attribute this.options = options this.response = response diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js index 9a26bd12f..c2ec2d30a 100644 --- a/src/services/status_poster/status_poster.service.js +++ b/src/services/status_poster/status_poster.service.js @@ -37,13 +37,12 @@ const postStatus = ({ preview, idempotencyKey, }).then(({ data }) => { - if (!preview) - store.dispatch('addNewStatuses', { - statuses: [data], - timeline: 'friends', - showImmediately: true, - noIdUpdate: true, // To prevent missing notices on next pull. - }) + if (!preview) store.dispatch('addNewStatuses', { + statuses: [data], + timeline: 'friends', + showImmediately: true, + noIdUpdate: true, // To prevent missing notices on next pull. + }) return data })