fix includeTypes
This commit is contained in:
parent
d10f1c72c7
commit
1007015582
2 changed files with 6 additions and 11 deletions
|
|
@ -312,6 +312,7 @@ export const fetchTimeline = ({
|
|||
|
||||
notifications: MASTODON_USER_NOTIFICATIONS_URL,
|
||||
}
|
||||
const urlFunc = timelineUrls[timeline]
|
||||
|
||||
const twoArgs = new Set([
|
||||
'user',
|
||||
|
|
@ -345,8 +346,6 @@ export const fetchTimeline = ({
|
|||
|
||||
const isNotifications = timeline === 'notifications'
|
||||
|
||||
const urlFunc = timelineUrls[timeline]
|
||||
|
||||
if (timeline === 'media') {
|
||||
params.onlyMedia = true
|
||||
}
|
||||
|
|
@ -363,7 +362,7 @@ export const fetchTimeline = ({
|
|||
params.folderId = bookmarkFolderId
|
||||
}
|
||||
|
||||
if (isNotifications && includeTypes.size > 0) {
|
||||
if (isNotifications && includeTypes.length > 0) {
|
||||
params.includeTypes = includeTypes
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,14 +79,6 @@ const fetchAndUpdate = ({
|
|||
|
||||
return fetchTimeline(args)
|
||||
.then((response) => {
|
||||
if (response.errors) {
|
||||
if (timeline === 'favorites') {
|
||||
useInstanceCapabilitiesStore().pleromaPublicFavouritesAvailable = false
|
||||
return
|
||||
}
|
||||
throw new Error(`${response.status} ${response.statusText}`)
|
||||
}
|
||||
|
||||
const { data: statuses, pagination } = response
|
||||
if (
|
||||
!older &&
|
||||
|
|
@ -108,6 +100,10 @@ const fetchAndUpdate = ({
|
|||
return { statuses, pagination }
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error.statusCode === 403 && timeline === 'favorites') {
|
||||
useInstanceCapabilitiesStore().pleromaPublicFavouritesAvailable = false
|
||||
return
|
||||
}
|
||||
useInterfaceStore().pushGlobalNotice({
|
||||
level: 'error',
|
||||
messageKey: 'timeline.error',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue