notifications now also undergo some parsing, hypothetically could use MastoAPI
notifications, maybe.
This commit is contained in:
parent
e0fd6d12ed
commit
790fcf37d2
4 changed files with 53 additions and 32 deletions
|
@ -44,7 +44,7 @@ const SUGGESTIONS_URL = '/api/v1/suggestions'
|
|||
const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites'
|
||||
|
||||
import { each, map } from 'lodash'
|
||||
import { parseStatus, parseUser } from '../status_normalizer/status_normalizer.service.js'
|
||||
import { parseStatus, parseUser, parseNotification } from '../status_normalizer/status_normalizer.service.js'
|
||||
import 'whatwg-fetch'
|
||||
|
||||
const oldfetch = window.fetch
|
||||
|
@ -347,7 +347,7 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use
|
|||
throw new Error('Error fetching timeline')
|
||||
})
|
||||
.then((data) => data.json())
|
||||
.then((data) => data.map(isNotifications ? _ => _ : parseStatus))
|
||||
.then((data) => data.map(isNotifications ? parseNotification : parseStatus))
|
||||
}
|
||||
|
||||
const verifyCredentials = (user) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue