migrated some tests to normalizer, fixed some potential bug, fixed tests to use
normalized naming instead of raw qvitter api objects. needs more tests tho.
This commit is contained in:
parent
966a9e78af
commit
d7bd294666
5 changed files with 128 additions and 46 deletions
|
@ -225,6 +225,9 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
|||
remove(timelineObject.visibleStatuses, { uri })
|
||||
}
|
||||
},
|
||||
'follow': (follow) => {
|
||||
// NOOP, it is known status but we don't do anything about it for now
|
||||
},
|
||||
'default': (unknown) => {
|
||||
console.log('unknown status type')
|
||||
console.log(unknown)
|
||||
|
|
|
@ -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, parseNotification } from '../status_normalizer/status_normalizer.service.js'
|
||||
import { parseStatus, parseUser, parseNotification } from '../entity_normalizer/entity_normalizer.service.js'
|
||||
import 'whatwg-fetch'
|
||||
|
||||
const oldfetch = window.fetch
|
||||
|
|
|
@ -139,7 +139,10 @@ export const parseStatus = (data) => {
|
|||
if (data.retweeted_status) {
|
||||
output.nsfw = data.retweeted_status.nsfw
|
||||
}
|
||||
} else {
|
||||
output.nsfw = data.nsfw
|
||||
}
|
||||
|
||||
output.statusnet_html = data.statusnet_html
|
||||
output.text = data.text
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue