diff options
| author | tusooa <tusooa@kazv.moe> | 2022-09-11 18:08:00 +0000 |
|---|---|---|
| committer | tusooa <tusooa@kazv.moe> | 2022-09-11 18:08:00 +0000 |
| commit | 2bea5d81288dcf4e231d557b5f1ef338fc1f78f6 (patch) | |
| tree | 67515a1ae88f74a88763a5e769a49ce6715ba73f /src/services/entity_normalizer | |
| parent | de40ebd5ea9c3a89c85d822ee719dce9b48c451a (diff) | |
| parent | ee58e3868c2d58b889d8a32c1b6dfd3732df7584 (diff) | |
Merge branch 'add/edit-status' into 'develop'
Add edit status functionality
See merge request pleroma/pleroma-fe!1537
Diffstat (limited to 'src/services/entity_normalizer')
| -rw-r--r-- | src/services/entity_normalizer/entity_normalizer.service.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 451427da..23061eba 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -251,6 +251,16 @@ export const parseAttachment = (data) => { return output } +export const parseSource = (data) => { + const output = {} + + output.text = data.text + output.spoiler_text = data.spoiler_text + output.content_type = data.content_type + + return output +} + export const parseStatus = (data) => { const output = {} const masto = Object.prototype.hasOwnProperty.call(data, 'account') @@ -272,6 +282,8 @@ export const parseStatus = (data) => { output.tags = data.tags + output.edited_at = data.edited_at + if (data.pleroma) { const { pleroma } = data output.text = pleroma.content ? data.pleroma.content['text/plain'] : data.content @@ -373,6 +385,10 @@ export const parseStatus = (data) => { output.favoritedBy = [] output.rebloggedBy = [] + if (Object.prototype.hasOwnProperty.call(data, 'originalStatus')) { + Object.assign(output, data.originalStatus) + } + return output } |
