diff options
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/api/api.service.js | 5 | ||||
| -rw-r--r-- | src/services/entity_normalizer/entity_normalizer.service.js | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 2b1ef5df..776d8dae 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -129,13 +129,14 @@ const updateBanner = ({credentials, params}) => { // location // description const updateProfile = ({credentials, params}) => { + // Always include these fields, because they might be empty or false + const fields = ['description', 'locked', 'no_rich_text', 'hide_network'] let url = PROFILE_UPDATE_URL const form = new FormData() each(params, (value, key) => { - /* Always include description, no_rich_text and locked, because it might be empty or false */ - if (key === 'description' || key === 'locked' || key === 'no_rich_text' || value) { + if (fields.includes(key) || value) { form.append(key, value) } }) diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 6fc6d152..abbc8ddf 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -211,6 +211,14 @@ export const parseStatus = (data) => { output.visibility = data.visibility output.created_at = new Date(data.created_at) + // Converting to string, the right way. + output.in_reply_to_status_id = output.in_reply_to_status_id + ? String(output.in_reply_to_status_id) + : null + output.in_reply_to_user_id = output.in_reply_to_user_id + ? String(output.in_reply_to_user_id) + : null + output.user = parseUser(masto ? data.account : data.user) output.attentions = ((masto ? data.mentions : data.attentions) || []).map(parseUser) |
