From cd9a7dd48802fff8942ae607a23677cfb43a7b14 Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Tue, 12 Mar 2019 17:16:57 -0400
Subject: #436: integrate mastoAPI notifications

---
 src/components/notifications/notifications.vue | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/components/notifications/notifications.vue')

diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue
index 6f162b62..6438361d 100644
--- a/src/components/notifications/notifications.vue
+++ b/src/components/notifications/notifications.vue
@@ -9,7 +9,8 @@
         <div @click.prevent class="loadmore-error alert error" v-if="error">
           {{$t('timeline.error_fetching')}}
         </div>
-        <button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button>
+        <!-- <button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button> -->
+        <button v-if="notifications.length" @click.prevent="clear" class="read-button">{{$t('notifications.clear')}}</button>
       </div>
       <div class="panel-body">
         <div v-for="notification in visibleNotifications" :key="notification.action.id" class="notification" :class='{"unseen": !notification.seen}'>
-- 
cgit v1.2.3-70-g09d2


From e5e1d4c643d6b69217fb9a62b60f3f9c94ef4714 Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Thu, 14 Mar 2019 07:55:39 -0400
Subject: #436: fix notification order, follow type link issue, duplicate key

---
 src/components/notification/notification.vue                | 7 ++++++-
 src/components/notifications/notifications.vue              | 2 +-
 src/modules/statuses.js                                     | 8 ++++----
 src/services/entity_normalizer/entity_normalizer.service.js | 2 +-
 src/services/notification_utils/notification_utils.js       | 6 +++---
 5 files changed, 15 insertions(+), 10 deletions(-)

(limited to 'src/components/notifications/notifications.vue')

diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index 87b0fde2..6e8e9844 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -30,7 +30,12 @@
             <small>{{$t('notifications.followed_you')}}</small>
           </span>
         </div>
-        <div class="timeago">
+        <div class="timeago" v-if="notification.type === 'follow'">
+          <span class="faint">
+            <timeago :since="notification.action.created_at" :auto-update="240"></timeago>
+          </span>
+        </div>
+        <div class="timeago" v-else>
           <router-link v-if="notification.status" :to="{ name: 'conversation', params: { id: notification.status.id } }" class="faint-link">
             <timeago :since="notification.action.created_at" :auto-update="240"></timeago>
           </router-link>
diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue
index 6438361d..5a5f8ed8 100644
--- a/src/components/notifications/notifications.vue
+++ b/src/components/notifications/notifications.vue
@@ -13,7 +13,7 @@
         <button v-if="notifications.length" @click.prevent="clear" class="read-button">{{$t('notifications.clear')}}</button>
       </div>
       <div class="panel-body">
-        <div v-for="notification in visibleNotifications" :key="notification.action.id" class="notification" :class='{"unseen": !notification.seen}'>
+        <div v-for="notification in visibleNotifications" :key="notification.action.id + notification.id" class="notification" :class='{"unseen": !notification.seen}'>
           <div class="notification-overlay"></div>
           <notification :notification="notification"></notification>
         </div>
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index fde783a5..4cc3907d 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -269,11 +269,11 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
 }
 
 const addNewNotifications = (state, { dispatch, notifications, older, visibleNotificationTypes }) => {
-  const allStatuses = state.allStatuses
-  const allStatusesObject = state.allStatusesObject
+  // const allStatuses = state.allStatuses
+  // const allStatusesObject = state.allStatusesObject
   each(notifications, (notification) => {
-    notification.action = mergeOrAdd(allStatuses, allStatusesObject, notification.action).item
-    notification.status = notification.status && mergeOrAdd(allStatuses, allStatusesObject, notification.status).item
+    // notification.action = mergeOrAdd(allStatuses, allStatusesObject, notification.action).item
+    // notification.status = notification.status && mergeOrAdd(allStatuses, allStatusesObject, notification.status).item
 
     // Only add a new notification if we don't have one for the same action
     if (!state.notifications.idStore.hasOwnProperty(notification.id)) {
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index 5444a1e3..4ca7f56b 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -275,7 +275,7 @@ export const parseNotification = (data) => {
     output.status = output.type === 'follow'
       ? parseFollow(data)
       : parseStatus(data.status)
-    if (data.type === 'reblog') {
+    if (data.type === 'reblog' || data.type === 'favourite') {
       output.status.user = parseUser(data.account)
       output.status.created_at = new Date(data.created_at)
     }
diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js
index cd8f3f9e..8afd114e 100644
--- a/src/services/notification_utils/notification_utils.js
+++ b/src/services/notification_utils/notification_utils.js
@@ -10,8 +10,8 @@ export const visibleTypes = store => ([
 ].filter(_ => _))
 
 const sortById = (a, b) => {
-  const seqA = Number(a.action.id)
-  const seqB = Number(b.action.id)
+  const seqA = Number(a.id)
+  const seqB = Number(b.id)
   const isSeqA = !Number.isNaN(seqA)
   const isSeqB = !Number.isNaN(seqB)
   if (isSeqA && isSeqB) {
@@ -21,7 +21,7 @@ const sortById = (a, b) => {
   } else if (!isSeqA && isSeqB) {
     return -1
   } else {
-    return a.action.id > b.action.id ? -1 : 1
+    return a.id > b.id ? -1 : 1
   }
 }
 
-- 
cgit v1.2.3-70-g09d2


From 52326e65515317be4815aaef320965313f84d64b Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Thu, 14 Mar 2019 11:57:24 -0400
Subject: #436: remove clear & dismiss UI updates

---
 src/components/notification/notification.js    |  3 ---
 src/components/notification/notification.vue   |  5 ----
 src/components/notifications/notifications.js  |  3 ---
 src/components/notifications/notifications.vue |  3 +--
 src/components/status/status.js                |  6 +----
 src/components/status/status.vue               |  3 ---
 src/i18n/en.json                               |  2 --
 src/modules/statuses.js                        | 36 +-------------------------
 src/services/api/api.service.js                | 25 +-----------------
 9 files changed, 4 insertions(+), 82 deletions(-)

(limited to 'src/components/notifications/notifications.vue')

diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js
index c86f22bb..fe5b7018 100644
--- a/src/components/notification/notification.js
+++ b/src/components/notification/notification.js
@@ -21,9 +21,6 @@ const Notification = {
     },
     userProfileLink (user) {
       return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
-    },
-    dismiss () {
-      this.$store.dispatch('dismissNotifications', { id: this.notification.id })
     }
   },
   computed: {
diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index 6e8e9844..fa931fb6 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -3,8 +3,6 @@
     v-if="notification.type === 'mention'" 
     :compact="true" 
     :statusoid="notification.status"
-    isNotification="true"
-    @dismissNotification="dismiss"
   >
   </status>
   <div class="non-mention" :class="[userClass, { highlighted: userStyle }]" :style="[ userStyle ]"v-else>
@@ -40,9 +38,6 @@
             <timeago :since="notification.action.created_at" :auto-update="240"></timeago>
           </router-link>
         </div>
-        <span class="button-icon" @click.prevent="dismiss">
-          <i class="button-icon icon-cancel delete-status"></i>
-        </span>
       </span>
       <div class="follow-text" v-if="notification.type === 'follow'">
         <router-link :to="userProfileLink(notification.action.user)">
diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js
index 68004d54..e1c53c58 100644
--- a/src/components/notifications/notifications.js
+++ b/src/components/notifications/notifications.js
@@ -55,9 +55,6 @@ const Notifications = {
     markAsSeen () {
       this.$store.dispatch('markNotificationsAsSeen')
     },
-    clear () {
-      this.$store.dispatch('clearNotifications')
-    },
     fetchOlderNotifications () {
       const store = this.$store
       const credentials = store.state.users.currentUser.credentials
diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue
index 5a5f8ed8..05f51f6c 100644
--- a/src/components/notifications/notifications.vue
+++ b/src/components/notifications/notifications.vue
@@ -9,8 +9,7 @@
         <div @click.prevent class="loadmore-error alert error" v-if="error">
           {{$t('timeline.error_fetching')}}
         </div>
-        <!-- <button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button> -->
-        <button v-if="notifications.length" @click.prevent="clear" class="read-button">{{$t('notifications.clear')}}</button>
+        <button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button>
       </div>
       <div class="panel-body">
         <div v-for="notification in visibleNotifications" :key="notification.action.id + notification.id" class="notification" :class='{"unseen": !notification.seen}'>
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 4cd26be3..9e18fe15 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -25,8 +25,7 @@ const Status = {
     'replies',
     'isPreview',
     'noHeading',
-    'inlineExpanded',
-    'isNotification'
+    'inlineExpanded'
   ],
   data () {
     return {
@@ -366,9 +365,6 @@ const Status = {
     setMedia () {
       const attachments = this.attachmentSize === 'hide' ? this.status.attachments : this.galleryAttachments
       return () => this.$store.dispatch('setMedia', attachments)
-    },
-    dismissNotification () {
-      this.$emit('dismissNotification')
     }
   },
   watch: {
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 28a44346..1f6d0325 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -52,9 +52,6 @@
                 <a :href="status.external_url" target="_blank" v-if="!status.is_local && !isPreview" class="source_url" title="Source">
                   <i class="button-icon icon-link-ext-alt"></i>
                 </a>
-                <span class="button-icon" v-if="isNotification" @click.prevent="dismissNotification">
-                  <i class="button-icon icon-cancel delete-status"></i>
-                </span>
                 <template v-if="expandable && !isPreview">
                   <a href="#" @click.prevent="toggleExpanded" title="Expand">
                     <i class="button-icon icon-plus-squared"></i>
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 38abfaf5..01fe2fba 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -62,8 +62,6 @@
     "load_older": "Load older notifications",
     "notifications": "Notifications",
     "read": "Read!",
-    "clear": "Clear!",
-    "dismiss": "Dismiss!",
     "repeated_you": "repeated your status",
     "no_more_notifications": "No more notifications"
   },
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index 4cc3907d..1eb1a3e3 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -1,4 +1,4 @@
-import { remove, slice, each, find, findIndex, maxBy, minBy, merge, first, last, isArray } from 'lodash'
+import { remove, slice, each, find, maxBy, minBy, merge, first, last, isArray } from 'lodash'
 import apiService from '../services/api/api.service.js'
 // import parse from '../services/status_parser/status_parser.js'
 
@@ -390,27 +390,6 @@ export const mutations = {
       notification.seen = true
     })
   },
-  clearNotifications (state) {
-    state.notifications.data = []
-    state.notifications.idStore = {}
-    state.notifications.maxId = 0
-    state.notifications.minId = 0
-  },
-  dismissNotifications (state, { id }) {
-    const { data } = state.notifications
-    const idx = findIndex(data, { id })
-
-    if (idx !== -1) {
-      const notification = data[idx]
-      data.splice(idx, 1)
-      delete state.notifications.idStore[id]
-      if (state.notifications.maxId === notification.id) {
-        state.notifications.maxId = data.length ? maxBy(data, 'id').id : 0
-      } else if (state.notifications.minId === notification.id) {
-        state.notifications.minId = data.length ? minBy(data, 'id').id : 0
-      }
-    }
-  },
   queueFlush (state, { timeline, id }) {
     state.timelines[timeline].flushMarker = id
   }
@@ -495,19 +474,6 @@ const statuses = {
         id: rootState.statuses.notifications.maxId,
         credentials: rootState.users.currentUser.credentials
       })
-    },
-    clearNotifications ({ rootState, commit }) {
-      commit('clearNotifications')
-      apiService.clearNotifications({
-        credentials: rootState.users.currentUser.credentials
-      })
-    },
-    dismissNotifications ({ rootState, commit }, { id }) {
-      commit('dismissNotifications', { id })
-      apiService.dismissNotifications({
-        id,
-        credentials: rootState.users.currentUser.credentials
-      })
     }
   },
   mutations
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 9d3139ce..03553d75 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -43,8 +43,6 @@ const SUGGESTIONS_URL = '/api/v1/suggestions'
 
 const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites'
 const MASTODON_USER_NOTIFICATIONS_URL = '/api/v1/notifications'
-const MASTODON_USER_NOTIFICATIONS_CLEAR_URL = '/api/v1/notifications/clear'
-const MASTODON_USER_NOTIFICATIONS_DISMISS_URL = '/api/v1/notifications/dismiss'
 
 import { each, map } from 'lodash'
 import { parseStatus, parseUser, parseNotification } from '../entity_normalizer/entity_normalizer.service.js'
@@ -577,25 +575,6 @@ const markNotificationsAsSeen = ({id, credentials}) => {
   }).then((data) => data.json())
 }
 
-const clearNotifications = ({ credentials }) => {
-  return fetch(MASTODON_USER_NOTIFICATIONS_CLEAR_URL, {
-    headers: authHeaders(credentials),
-    method: 'POST'
-  }).then((data) => data.json())
-}
-
-const dismissNotifications = ({ id, credentials }) => {
-  const body = new FormData()
-
-  body.append('id', id)
-
-  return fetch(MASTODON_USER_NOTIFICATIONS_DISMISS_URL, {
-    body,
-    headers: authHeaders(credentials),
-    method: 'POST'
-  }).then((data) => data.json())
-}
-
 const apiService = {
   verifyCredentials,
   fetchTimeline,
@@ -636,9 +615,7 @@ const apiService = {
   approveUser,
   denyUser,
   suggestions,
-  markNotificationsAsSeen,
-  clearNotifications,
-  dismissNotifications
+  markNotificationsAsSeen
 }
 
 export default apiService
-- 
cgit v1.2.3-70-g09d2


From 8ade93bb4db60e04e5e63d533401ee79de403e19 Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Thu, 14 Mar 2019 22:36:11 -0400
Subject: #436: update test

---
 src/components/notifications/notifications.vue     |   2 +-
 test/fixtures/mastoapi.json                        | 125 ++++++++++++++++-----
 .../entity_normalizer/entity_normalizer.spec.js    |   5 +-
 3 files changed, 105 insertions(+), 27 deletions(-)

(limited to 'src/components/notifications/notifications.vue')

diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue
index 05f51f6c..37104b90 100644
--- a/src/components/notifications/notifications.vue
+++ b/src/components/notifications/notifications.vue
@@ -12,7 +12,7 @@
         <button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button>
       </div>
       <div class="panel-body">
-        <div v-for="notification in visibleNotifications" :key="notification.action.id + notification.id" class="notification" :class='{"unseen": !notification.seen}'>
+        <div v-for="notification in visibleNotifications" :key="notification.id" class="notification" :class='{"unseen": !notification.seen}'>
           <div class="notification-overlay"></div>
           <notification :notification="notification"></notification>
         </div>
diff --git a/test/fixtures/mastoapi.json b/test/fixtures/mastoapi.json
index 858d7a0d..887fb83e 100644
--- a/test/fixtures/mastoapi.json
+++ b/test/fixtures/mastoapi.json
@@ -58,7 +58,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/16033fbb-97c0-4f0e-b834-7abb92fb8639",
     "url": "https://shigusegubu.club/objects/16033fbb-97c0-4f0e-b834-7abb92fb8639",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -127,7 +130,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/6634d32b-96a8-4852-a3db-ac8730715779",
     "url": "https://shigusegubu.club/objects/6634d32b-96a8-4852-a3db-ac8730715779",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -250,7 +256,10 @@
         "tags": [],
         "uri": "https://pleroma.soykaf.com/objects/bf7e43d4-5048-4176-8519-58e3e1014f8b",
         "url": "https://pleroma.soykaf.com/objects/bf7e43d4-5048-4176-8519-58e3e1014f8b",
-        "visibility": "public"
+        "visibility": "public",
+        "pleroma": {
+            "local": true
+        }
     },
     "reblogged": false,
     "reblogs_count": 0,
@@ -260,7 +269,10 @@
     "tags": [],
     "uri": "https://pleroma.soykaf.com/objects/bf7e43d4-5048-4176-8519-58e3e1014f8b",
     "url": "https://pleroma.soykaf.com/objects/bf7e43d4-5048-4176-8519-58e3e1014f8b",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -329,7 +341,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/0f963ca1-a263-41ca-a43c-b5d26d0a08e9",
     "url": "https://shigusegubu.club/objects/0f963ca1-a263-41ca-a43c-b5d26d0a08e9",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -390,7 +405,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/3f809bd8-656f-4a29-81d4-80eed6916eb0",
     "url": "https://shigusegubu.club/objects/3f809bd8-656f-4a29-81d4-80eed6916eb0",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -516,7 +534,10 @@
         }],
         "uri": "tag:social.super-niche.club,2019-01-17:noticeId=2353002:objectType=note",
         "url": "https://social.super-niche.club/notice/2353002",
-        "visibility": "public"
+        "visibility": "public",
+        "pleroma": {
+            "local": true
+        }
     },
     "reblogged": false,
     "reblogs_count": 0,
@@ -529,7 +550,10 @@
     }],
     "uri": "tag:social.super-niche.club,2019-01-17:noticeId=2353002:objectType=note",
     "url": "tag:social.super-niche.club,2019-01-17:noticeId=2353002:objectType=note",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -657,7 +681,10 @@
         "tags": [],
         "uri": "https://miniwa.moe/objects/448e2944-0ecd-457f-92c3-cb454f2b0fab",
         "url": "https://miniwa.moe/objects/448e2944-0ecd-457f-92c3-cb454f2b0fab",
-        "visibility": "public"
+        "visibility": "public",
+        "pleroma": {
+            "local": true
+        }
     },
     "reblogged": false,
     "reblogs_count": 0,
@@ -667,7 +694,10 @@
     "tags": [],
     "uri": "https://miniwa.moe/objects/448e2944-0ecd-457f-92c3-cb454f2b0fab",
     "url": "https://miniwa.moe/objects/448e2944-0ecd-457f-92c3-cb454f2b0fab",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -733,7 +763,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/38b1bc44-15d8-40dd-b1aa-937e0ff4a86d",
     "url": "https://shigusegubu.club/objects/38b1bc44-15d8-40dd-b1aa-937e0ff4a86d",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -794,7 +827,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/fbff5da4-a517-42a9-bca9-17cae8cf2542",
     "url": "https://shigusegubu.club/objects/fbff5da4-a517-42a9-bca9-17cae8cf2542",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -850,7 +886,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/4007d659-27c6-4577-be10-fd134f5e4e7e",
     "url": "https://shigusegubu.club/objects/4007d659-27c6-4577-be10-fd134f5e4e7e",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -906,7 +945,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/59912d51-1cc6-4dc7-828c-f167e6c8b391",
     "url": "https://shigusegubu.club/objects/59912d51-1cc6-4dc7-828c-f167e6c8b391",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -962,7 +1004,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/62690bce-3f49-4047-9c8e-8941f2f79e10",
     "url": "https://shigusegubu.club/objects/62690bce-3f49-4047-9c8e-8941f2f79e10",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -1023,7 +1068,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/818f3dd0-2ff8-4def-a170-e4d4c405f387",
     "url": "https://shigusegubu.club/objects/818f3dd0-2ff8-4def-a170-e4d4c405f387",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -1084,7 +1132,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/0783a193-c097-488d-8944-47df9372cd6e",
     "url": "https://shigusegubu.club/objects/0783a193-c097-488d-8944-47df9372cd6e",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -1145,7 +1196,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/145d5252-7b8e-467d-9f36-1db0818f452f",
     "url": "https://shigusegubu.club/objects/145d5252-7b8e-467d-9f36-1db0818f452f",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -1252,7 +1306,10 @@
         "tags": [],
         "uri": "https://pleroma.site/objects/3076c055-0e34-4cf9-86ca-2d148b9b694a",
         "url": "https://pleroma.site/objects/3076c055-0e34-4cf9-86ca-2d148b9b694a",
-        "visibility": "public"
+        "visibility": "public",
+        "pleroma": {
+            "local": true
+        }
     },
     "reblogged": false,
     "reblogs_count": 0,
@@ -1262,7 +1319,10 @@
     "tags": [],
     "uri": "https://pleroma.site/objects/3076c055-0e34-4cf9-86ca-2d148b9b694a",
     "url": "https://pleroma.site/objects/3076c055-0e34-4cf9-86ca-2d148b9b694a",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -1323,7 +1383,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/d4eb7c46-02f9-4b1f-83af-926cefa21f33",
     "url": "https://shigusegubu.club/objects/d4eb7c46-02f9-4b1f-83af-926cefa21f33",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -1446,7 +1509,10 @@
         "tags": [],
         "uri": "https://pleroma.soykaf.com/objects/338b6bd2-3c2d-40fe-93a3-28b688782733",
         "url": "https://pleroma.soykaf.com/objects/338b6bd2-3c2d-40fe-93a3-28b688782733",
-        "visibility": "public"
+        "visibility": "public",
+        "pleroma": {
+            "local": true
+        }
     },
     "reblogged": false,
     "reblogs_count": 0,
@@ -1456,7 +1522,10 @@
     "tags": [],
     "uri": "https://pleroma.soykaf.com/objects/338b6bd2-3c2d-40fe-93a3-28b688782733",
     "url": "https://pleroma.soykaf.com/objects/338b6bd2-3c2d-40fe-93a3-28b688782733",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -1517,7 +1586,10 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/f472f4ed-8b0b-492f-9d53-d69eda79629d",
     "url": "https://shigusegubu.club/objects/f472f4ed-8b0b-492f-9d53-d69eda79629d",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }, {
     "account": {
         "acct": "hj",
@@ -1578,5 +1650,8 @@
     "tags": [],
     "uri": "https://shigusegubu.club/objects/d6fb4fd2-1f6a-4446-a1a6-5edd34050096",
     "url": "https://shigusegubu.club/objects/d6fb4fd2-1f6a-4446-a1a6-5edd34050096",
-    "visibility": "public"
+    "visibility": "public",
+    "pleroma": {
+        "local": true
+    }
 }]
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 6245361c..04bfb953 100644
--- a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js
+++ b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js
@@ -129,7 +129,10 @@ const makeMockStatusMasto = (overrides = {}) => {
     tags: [],
     uri: 'https://shigusegubu.club/objects/16033fbb-97c0-4f0e-b834-7abb92fb8639',
     url: 'https://shigusegubu.club/objects/16033fbb-97c0-4f0e-b834-7abb92fb8639',
-    visibility: 'public'
+    visibility: 'public',
+    pleroma: {
+      local: true
+    }
   }, overrides)
 }
 
-- 
cgit v1.2.3-70-g09d2

