From 4c9f3b946db181b6069df9290516c33a1f71233d Mon Sep 17 00:00:00 2001 From: shpuld Date: Sun, 27 Jan 2019 08:42:34 +0200 Subject: [PATCH 1/2] Add forgotten prop to entity normalizer --- src/services/entity_normalizer/entity_normalizer.service.js | 1 + .../specs/services/entity_normalizer/entity_normalizer.spec.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index becbab154d..4e24d39e00 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -104,6 +104,7 @@ export const parseUser = (data) => { output.background_image = data.background_image } + output.following = data.following output.created_at = new Date(data.created_at) output.locked = data.locked output.followers_count = data.followers_count diff --git a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js index 703fecf1c8..c1d5ac12c5 100644 --- a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js +++ b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js @@ -80,6 +80,7 @@ const makeMockUserMasto = (overrides = {}) => { fields: [], followers_count: 705, following_count: 326, + following: true, header: 'https://shigusegubu.club/media/7ab024d9-2a8a-4fbc-9ce8-da06756ae2db/6aadefe4e264133bc377ab450e6b045b6f5458542a5c59e6c741f86107f0388b.png', header_static: From b9142e6facfcb0853314a1d51d955e2391685689 Mon Sep 17 00:00:00 2001 From: shpuld Date: Sun, 27 Jan 2019 16:10:55 +0200 Subject: [PATCH 2/2] Move following to qvitter only space --- src/services/entity_normalizer/entity_normalizer.service.js | 3 ++- .../specs/services/entity_normalizer/entity_normalizer.spec.js | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 4e24d39e00..d78c6a7601 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -102,9 +102,10 @@ export const parseUser = (data) => { output.default_scope = data.default_scope output.hide_network = data.hide_network output.background_image = data.background_image + // on mastoapi this info is contained in a "relationship" + output.following = data.following } - output.following = data.following output.created_at = new Date(data.created_at) output.locked = data.locked output.followers_count = data.followers_count diff --git a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js index c1d5ac12c5..703fecf1c8 100644 --- a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js +++ b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js @@ -80,7 +80,6 @@ const makeMockUserMasto = (overrides = {}) => { fields: [], followers_count: 705, following_count: 326, - following: true, header: 'https://shigusegubu.club/media/7ab024d9-2a8a-4fbc-9ce8-da06756ae2db/6aadefe4e264133bc377ab450e6b045b6f5458542a5c59e6c741f86107f0388b.png', header_static: