diff options
| author | dave <starpumadev@gmail.com> | 2019-03-13 15:34:45 -0400 |
|---|---|---|
| committer | dave <starpumadev@gmail.com> | 2019-03-13 15:34:45 -0400 |
| commit | 78951964fb7805aa35b73783905926b4d1d49dec (patch) | |
| tree | 0c720f23405bf8828670af532066669c641cf166 /src | |
| parent | 2f7d890ad228a2aeb8643373c9c9a6d925c6ff7f (diff) | |
#436: update entity_normalizer
Diffstat (limited to 'src')
| -rw-r--r-- | src/services/entity_normalizer/entity_normalizer.service.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 4e6248bb..b48f979c 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -66,6 +66,7 @@ export const parseUser = (data) => { } // TODO: handle is_local + output.is_local = true } else { output.screen_name = data.screen_name @@ -179,6 +180,7 @@ export const parseStatus = (data) => { output.external_url = data.url // TODO: handle is_local + output.is_local = true } else { output.favorited = data.favorited output.fave_num = data.fave_num @@ -273,6 +275,10 @@ export const parseNotification = (data) => { output.status = output.type === 'follow' ? parseFollow(data) : parseStatus(data.status) + if (data.type === 'reblog') { + output.status.user = parseUser(data.account) + output.status.created_at = new Date(data.created_at) + } output.action = output.status // not sure output.from_profile = parseUser(data.account) } else { |
