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