aboutsummaryrefslogtreecommitdiff
path: root/src/services/entity_normalizer/entity_normalizer.service.js
diff options
context:
space:
mode:
authorSean King <seanking2919@protonmail.com>2022-08-07 06:38:56 +0000
committerSean King <seanking2919@protonmail.com>2022-08-07 06:38:56 +0000
commit572f28d7c9efea4300cb88063baf4daab91e7910 (patch)
tree29d966a1b7141f6a768120497d3f34143f467212 /src/services/entity_normalizer/entity_normalizer.service.js
parent18d69f93d38dc15a74db81ee4c10b4766bebfc35 (diff)
parent6a2f4270727913b8e5d4670b5b3bbc3f57f51ec5 (diff)
Merge branch 'fix/merge-conflicts/report-notifications' into 'feat/report-notification'
Fixing merge conflicts and lint for report notifications MR See merge request pleroma/pleroma-fe!1585
Diffstat (limited to 'src/services/entity_normalizer/entity_normalizer.service.js')
-rw-r--r--src/services/entity_normalizer/entity_normalizer.service.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index 0005e95a..9000e81a 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -39,9 +39,9 @@ const qvitterStatusType = (status) => {
export const parseUser = (data) => {
const output = {}
- const masto = data.hasOwnProperty('acct')
+ const masto = Object.prototype.hasOwnProperty.call(data, 'acct')
// case for users in "mentions" property for statuses in MastoAPI
- const mastoShort = masto && !data.hasOwnProperty('avatar')
+ const mastoShort = masto && !Object.prototype.hasOwnProperty.call(data, 'avatar')
output.id = String(data.id)
output._original = data // used for server-side settings
@@ -225,7 +225,7 @@ export const parseUser = (data) => {
export const parseAttachment = (data) => {
const output = {}
- const masto = !data.hasOwnProperty('oembed')
+ const masto = !Object.prototype.hasOwnProperty.call(data, 'oembed')
if (masto) {
// Not exactly same...
@@ -246,7 +246,7 @@ export const parseAttachment = (data) => {
export const parseStatus = (data) => {
const output = {}
- const masto = data.hasOwnProperty('account')
+ const masto = Object.prototype.hasOwnProperty.call(data, 'account')
if (masto) {
output.favorited = data.favourited
@@ -371,10 +371,10 @@ export const parseStatus = (data) => {
export const parseNotification = (data) => {
const mastoDict = {
- 'favourite': 'like',
- 'reblog': 'repeat'
+ favourite: 'like',
+ reblog: 'repeat'
}
- const masto = !data.hasOwnProperty('ntype')
+ const masto = !Object.prototype.hasOwnProperty.call(data, 'ntype')
const output = {}
if (masto) {