diff --git a/changelog.d/akkoma-sharkey-net-support.add b/changelog.d/akkoma-sharkey-net-support.add deleted file mode 100644 index 0e39a4145..000000000 --- a/changelog.d/akkoma-sharkey-net-support.add +++ /dev/null @@ -1 +0,0 @@ -Added support for Akkoma and Sharkey.NET backend (tested on Sharkey) diff --git a/index.html b/index.html index f279ed01a..a2f928361 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,6 @@ - diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 39fc6f6f0..1b133a089 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -63,11 +63,10 @@ const getInstanceConfig = async ({ store }) => { const textlimit = data.max_toot_chars const vapidPublicKey = data.pleroma.vapid_public_key - store.dispatch('setInstanceOption', { name: 'pleromaExtensionsAvailable', value: data.pleroma }) store.dispatch('setInstanceOption', { name: 'textlimit', value: textlimit }) store.dispatch('setInstanceOption', { name: 'accountApprovalRequired', value: data.approval_required }) - store.dispatch('setInstanceOption', { name: 'birthdayRequired', value: !!data.pleroma?.metadata.birthday_required }) - store.dispatch('setInstanceOption', { name: 'birthdayMinAge', value: data.pleroma?.metadata.birthday_min_age || 0 }) + store.dispatch('setInstanceOption', { name: 'birthdayRequired', value: !!data.pleroma.metadata.birthday_required }) + store.dispatch('setInstanceOption', { name: 'birthdayMinAge', value: data.pleroma.metadata.birthday_min_age || 0 }) if (vapidPublicKey) { store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey }) @@ -79,8 +78,6 @@ const getInstanceConfig = async ({ store }) => { console.error('Could not load instance config, potentially fatal') console.error(error) } - // We should check for scrobbles support here but it requires userId - // so instead we check for it where it's fetched (statuses.js) } const getBackendProvidedConfig = async () => { @@ -245,8 +242,7 @@ const resolveStaffAccounts = ({ store, accounts }) => { const getNodeInfo = async ({ store }) => { try { - let res = await preloadFetch('/nodeinfo/2.1.json') - if (!res.ok) res = await preloadFetch('/nodeinfo/2.0.json') + const res = await preloadFetch('/nodeinfo/2.1.json') if (res.ok) { const data = await res.json() const metadata = data.metadata @@ -266,7 +262,6 @@ const getNodeInfo = async ({ store }) => { store.dispatch('setInstanceOption', { name: 'mailerEnabled', value: metadata.mailerEnabled }) store.dispatch('setInstanceOption', { name: 'quotingAvailable', value: features.includes('quote_posting') }) store.dispatch('setInstanceOption', { name: 'groupActorAvailable', value: features.includes('pleroma:group_actors') }) - store.dispatch('setInstanceOption', { name: 'localBubbleInstances', value: metadata.localBubbleInstances ?? [] }) const uploadLimits = metadata.uploadLimits store.dispatch('setInstanceOption', { name: 'uploadlimit', value: parseInt(uploadLimits.general) }) @@ -285,6 +280,7 @@ const getNodeInfo = async ({ store }) => { const software = data.software store.dispatch('setInstanceOption', { name: 'backendVersion', value: software.version }) store.dispatch('setInstanceOption', { name: 'backendRepository', value: software.repository }) + store.dispatch('setInstanceOption', { name: 'pleromaBackend', value: software.name === 'pleroma' }) const priv = metadata.private store.dispatch('setInstanceOption', { name: 'private', value: priv }) diff --git a/src/boot/routes.js b/src/boot/routes.js index 02abf8ce6..da87c6c61 100644 --- a/src/boot/routes.js +++ b/src/boot/routes.js @@ -1,5 +1,4 @@ import PublicTimeline from 'components/public_timeline/public_timeline.vue' -import BubbleTimeline from 'components/bubble_timeline/bubble_timeline.vue' import PublicAndExternalTimeline from 'components/public_and_external_timeline/public_and_external_timeline.vue' import FriendsTimeline from 'components/friends_timeline/friends_timeline.vue' import TagTimeline from 'components/tag_timeline/tag_timeline.vue' @@ -55,7 +54,6 @@ export default (store) => { { name: 'friends', path: '/main/friends', component: FriendsTimeline, beforeEnter: validateAuthenticatedRoute }, { name: 'tag-timeline', path: '/tag/:tag', component: TagTimeline }, { name: 'bookmarks', path: '/bookmarks', component: BookmarkTimeline }, - { name: 'bubble', path: '/bubble', component: BubbleTimeline }, { name: 'conversation', path: '/notice/:id', component: ConversationPage, meta: { dontScroll: true } }, { name: 'quotes', path: '/notice/:id/quotes', component: QuotesTimeline }, { diff --git a/src/components/bubble_timeline/bubble_timeline.js b/src/components/bubble_timeline/bubble_timeline.js deleted file mode 100644 index 6f73dd2b8..000000000 --- a/src/components/bubble_timeline/bubble_timeline.js +++ /dev/null @@ -1,18 +0,0 @@ -import Timeline from '../timeline/timeline.vue' -const BubbleTimeline = { - components: { - Timeline - }, - computed: { - timeline () { return this.$store.state.statuses.timelines.bubble } - }, - created () { - this.$store.dispatch('startFetchingTimeline', { timeline: 'bubble' }) - }, - unmounted () { - this.$store.dispatch('stopFetchingTimeline', 'bubble') - } - -} - -export default BubbleTimeline diff --git a/src/components/bubble_timeline/bubble_timeline.vue b/src/components/bubble_timeline/bubble_timeline.vue deleted file mode 100644 index 4aefa2729..000000000 --- a/src/components/bubble_timeline/bubble_timeline.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js index 2cdb4c45b..681aaf05b 100644 --- a/src/components/nav_panel/nav_panel.js +++ b/src/components/nav_panel/nav_panel.js @@ -15,7 +15,6 @@ import { library } from '@fortawesome/fontawesome-svg-core' import { faUsers, faGlobe, - faCity, faBookmark, faEnvelope, faChevronDown, @@ -32,7 +31,6 @@ import { library.add( faUsers, faGlobe, - faCity, faBookmark, faEnvelope, faChevronDown, @@ -110,8 +108,7 @@ const NavPanel = { privateMode: state => state.instance.private, federating: state => state.instance.federating, pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable, - bookmarkFolders: state => state.instance.pleromaBookmarkFoldersAvailable, - bubbleTimeline: state => state.instance.localBubbleInstances.length > 0 + bookmarkFolders: state => state.instance.pleromaBookmarkFoldersAvailable }), timelinesItems () { return filterNavigation( @@ -124,8 +121,7 @@ const NavPanel = { isFederating: this.federating, isPrivate: this.privateMode, currentUser: this.currentUser, - supportsBookmarkFolders: this.bookmarkFolders, - supportsBubbleTimeline: this.bubbleTimeline + supportsBookmarkFolders: this.bookmarkFolders } ) }, @@ -140,8 +136,7 @@ const NavPanel = { isFederating: this.federating, isPrivate: this.privateMode, currentUser: this.currentUser, - supportsBookmarkFolders: this.bookmarkFolders, - supportsBubbleTimeline: this.bubbleTimeline + supportsBookmarkFolders: this.bookmarkFolders } ) }, diff --git a/src/components/navigation/filter.js b/src/components/navigation/filter.js index 8e5ace57b..12ab9266e 100644 --- a/src/components/navigation/filter.js +++ b/src/components/navigation/filter.js @@ -19,11 +19,11 @@ export const getListEntries = store => store.allLists.map(list => ({ iconLetter: list.title[0] })) -export const getBookmarkFolderEntries = store => store.allFolders ? store.allFolders.map(folder => ({ +export const getBookmarkFolderEntries = store => store.allFolders.map(folder => ({ name: 'bookmark-folder-' + folder.id, routeObject: { name: 'bookmark-folder', params: { id: folder.id } }, labelRaw: folder.name, iconEmoji: folder.emoji, iconEmojiUrl: folder.emoji_url, iconLetter: folder.name[0] -})) : [] +})) diff --git a/src/components/navigation/navigation.js b/src/components/navigation/navigation.js index 6702bea4e..a8e1fc966 100644 --- a/src/components/navigation/navigation.js +++ b/src/components/navigation/navigation.js @@ -27,12 +27,6 @@ export const TIMELINES = { label: 'nav.public_tl', criteria: ['!private'] }, - bubble: { - route: 'bubble', - icon: 'city', - label: 'nav.bubble', - criteria: ['supportsBubbleTimeline'] - }, twkn: { route: 'public-external-timeline', anon: true, diff --git a/src/components/settings_modal/tabs/notifications_tab.js b/src/components/settings_modal/tabs/notifications_tab.js index 76007773b..c53b5889d 100644 --- a/src/components/settings_modal/tabs/notifications_tab.js +++ b/src/components/settings_modal/tabs/notifications_tab.js @@ -18,7 +18,7 @@ const NotificationsTab = { }, canReceiveReports () { if (!this.user) { return false } - return this.user.privileges?.includes('reports_manage_reports') + return this.user.privileges.includes('reports_manage_reports') }, ...SharedComputedObject() }, diff --git a/src/components/settings_modal/tabs/security_tab/security_tab.js b/src/components/settings_modal/tabs/security_tab/security_tab.js index 04e0328cd..3cbc0c927 100644 --- a/src/components/settings_modal/tabs/security_tab/security_tab.js +++ b/src/components/settings_modal/tabs/security_tab/security_tab.js @@ -41,8 +41,8 @@ const SecurityTab = { user () { return this.$store.state.users.currentUser }, - pleromaExtensionsAvailable () { - return this.$store.state.instance.pleromaExtensionsAvailable + pleromaBackend () { + return this.$store.state.instance.pleromaBackend }, oauthTokens () { return useOAuthTokensStore().tokens.map(oauthToken => { diff --git a/src/components/status/status.js b/src/components/status/status.js index ba6fe1b68..7ee2632bd 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -24,7 +24,6 @@ import { faLock, faLockOpen, faGlobe, - faIgloo, faTimes, faRetweet, faReply, @@ -44,7 +43,6 @@ import { library.add( faEnvelope, faGlobe, - faIgloo, faLock, faLockOpen, faTimes, @@ -486,8 +484,6 @@ const Status = { return 'lock-open' case 'direct': return 'envelope' - case 'local': - return 'igloo' default: return 'globe' } diff --git a/src/components/timeline_menu/timeline_menu.js b/src/components/timeline_menu/timeline_menu.js index 4c8f7b76e..38e6bdf4f 100644 --- a/src/components/timeline_menu/timeline_menu.js +++ b/src/components/timeline_menu/timeline_menu.js @@ -24,8 +24,7 @@ export const timelineNames = (supportsBookmarkFolders) => { dms: 'nav.dms', 'public-timeline': 'nav.public_tl', 'public-external-timeline': 'nav.twkn', - quotes: 'nav.quotes', - bubble: 'nav.bubble' + quotes: 'nav.quotes' } } @@ -59,8 +58,7 @@ const TimelineMenu = { currentUser: state => state.users.currentUser, privateMode: state => state.instance.private, federating: state => state.instance.federating, - bookmarkFolders: state => state.instance.pleromaBookmarkFoldersAvailable, - bubbleTimeline: state => state.instance.localBubbleInstances.length > 0 + bookmarkFolders: state => state.instance.pleromaBookmarkFoldersAvailable }), timelinesList () { return filterNavigation( @@ -70,8 +68,7 @@ const TimelineMenu = { isFederating: this.federating, isPrivate: this.privateMode, currentUser: this.currentUser, - supportsBookmarkFolders: this.bookmarkFolders, - supportsBubbleTimeline: this.bubbleTimeline + supportsBookmarkFolders: this.bookmarkFolders } ) } diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index f4ae5f12e..be81b8ad5 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -134,10 +134,7 @@ export default { }, showModerationMenu () { const privileges = this.loggedIn.privileges - return this.loggedIn.role === 'admin' || - privileges.includes('users_manage_activation_state') || - privileges.includes('users_delete')|| - privileges.includes('users_manage_tags') + return this.loggedIn.role === 'admin' || privileges.includes('users_manage_activation_state') || privileges.includes('users_delete') || privileges.includes('users_manage_tags') }, hasNote () { return this.relationship.note diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 49d6fd60a..751bfd5a0 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -81,7 +81,7 @@ const UserProfile = { return this.isUs || !this.user.hide_followers }, favoritesTabVisible () { - return this.isUs || (this.$store.state.instance.pleromaPublicFavouritesAvailable && !this.user.hide_favorites) + return this.isUs || !this.user.hide_favorites }, formattedBirthday () { const browserLocale = localeService.internalToBrowserLocale(this.$i18n.locale) diff --git a/src/i18n/en.json b/src/i18n/en.json index 14f36844b..019beba1c 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -117,7 +117,6 @@ "flash_security": "Note that this can be potentially dangerous since Flash content is still arbitrary code.", "flash_fail": "Failed to load flash content, see console for details.", "scope_in_timeline": { - "local": "Non-federated", "direct": "Direct", "private": "Followers-only", "public": "Public", @@ -172,7 +171,6 @@ "interactions": "Interactions", "dms": "Direct messages", "public_tl": "Public timeline", - "bubble": "Bubble timeline", "timeline": "Timeline", "home_timeline": "Home timeline", "twkn": "Known Network", @@ -291,8 +289,7 @@ "text/plain": "Plain text", "text/html": "HTML", "text/markdown": "Markdown", - "text/bbcode": "BBCode", - "text/x.misskeymarkdown": "MFM" + "text/bbcode": "BBCode" }, "content_type_selection": "Post format", "content_warning": "Subject (optional)", diff --git a/src/modules/api.js b/src/modules/api.js index ab8d7162f..69c8282b8 100644 --- a/src/modules/api.js +++ b/src/modules/api.js @@ -211,7 +211,6 @@ const api = { statusId = false, bookmarkFolderId = false }) { - if (timeline === 'favourites' && !store.rootState.instance.pleromaPublicFavouritesAvailable) return if (store.state.fetchers[timeline]) return const fetcher = store.state.backendInteractor.startFetchingTimeline({ @@ -282,7 +281,6 @@ const api = { // Bookmark folders startFetchingBookmarkFolders (store) { if (store.state.fetchers.bookmarkFolders) return - if (!store.rootState.instance.pleromaBookmarkFoldersAvailable) return const fetcher = store.state.backendInteractor.startFetchingBookmarkFolders({ store }) store.commit('addFetcher', { fetcherName: 'bookmarkFolders', fetcher }) }, diff --git a/src/modules/instance.js b/src/modules/instance.js index 98917e791..83671a881 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -143,7 +143,7 @@ const defaultState = { emoji: {}, emojiFetched: false, unicodeEmojiAnnotations: {}, - pleromaExtensionsAvailable: true, + pleromaBackend: true, postFormats: [], restrictedNicknames: [], safeDM: true, @@ -156,7 +156,6 @@ const defaultState = { pleromaChatMessagesAvailable: false, pleromaCustomEmojiReactionsAvailable: false, pleromaBookmarkFoldersAvailable: false, - pleromaPublicFavouritesAvailable: true, gopherAvailable: false, mediaProxyAvailable: false, suggestionsEnabled: false, @@ -341,10 +340,7 @@ const instance = { async getCustomEmoji ({ commit, state }) { try { - let res = await window.fetch('/api/v1/pleroma/emoji') - if (!res.ok) { - res = await window.fetch('/api/pleroma/emoji.json') - } + const res = await window.fetch('/api/pleroma/emoji.json') if (res.ok) { const result = await res.json() const values = Array.isArray(result) ? Object.assign({}, ...result) : result diff --git a/src/modules/statuses.js b/src/modules/statuses.js index efdfc5894..d08b3334c 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -39,7 +39,6 @@ export const defaultState = () => ({ conversationsObject: {}, maxId: 0, favorites: new Set(), - pleromaScrobblesAvailable: true, // not reported in nodeinfo timelines: { mentions: emptyTl(), public: emptyTl(), @@ -51,8 +50,7 @@ export const defaultState = () => ({ tag: emptyTl(), dms: emptyTl(), bookmarks: emptyTl(), - list: emptyTl(), - bubble: emptyTl() + list: emptyTl() } }) @@ -110,21 +108,12 @@ const sortTimeline = (timeline) => { } const getLatestScrobble = (state, user) => { - const scrobbles = state.pleromaScrobblesAvailable - if (!scrobbles) return - if (state.scrobblesNextFetch[user.id] && state.scrobblesNextFetch[user.id] > Date.now()) { return } state.scrobblesNextFetch[user.id] = Date.now() + 24 * 60 * 60 * 1000 - if (!scrobbles) return apiService.fetchScrobbles({ accountId: user.id }).then((scrobbles) => { - if (scrobbles?.error?.status === 501) { - state.pleromaScrobblesAvailable = false - return - } - if (scrobbles.length > 0) { user.latestScrobble = scrobbles[0] diff --git a/src/modules/users.js b/src/modules/users.js index c59c04dff..01936c716 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -599,7 +599,6 @@ const users = { return new Promise((resolve, reject) => { const commit = store.commit const dispatch = store.dispatch - const rootState = store.rootState commit('beginLogin') store.rootState.api.backendInteractor.verifyCredentials(accessToken) .then((data) => { @@ -666,10 +665,8 @@ const users = { // Start fetching notifications dispatch('startFetchingNotifications') - if (rootState.instance.pleromaChatMessagesAvailable) { - // Start fetching chats - dispatch('startFetchingChats') - } + // Start fetching chats + dispatch('startFetchingChats') } dispatch('startFetchingLists') diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 6de94278e..117c621d9 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -15,7 +15,7 @@ const TAG_USER_URL = '/api/pleroma/admin/users/tag' const PERMISSION_GROUP_URL = (screenName, right) => `/api/pleroma/admin/users/${screenName}/permission_group/${right}` const ACTIVATE_USER_URL = '/api/pleroma/admin/users/activate' const DEACTIVATE_USER_URL = '/api/pleroma/admin/users/deactivate' -const ADMIN_USERS_URL = '/api/v1/pleroma/admin/users' +const ADMIN_USERS_URL = '/api/pleroma/admin/users' const SUGGESTIONS_URL = '/api/v1/suggestions' const NOTIFICATION_SETTINGS_URL = '/api/pleroma/notification_settings' const NOTIFICATION_READ_URL = '/api/v1/pleroma/notifications/read' @@ -61,7 +61,6 @@ const MASTODON_LIST_TIMELINE_URL = id => `/api/v1/timelines/list/${id}` const MASTODON_LIST_ACCOUNTS_URL = id => `/api/v1/lists/${id}/accounts` const MASTODON_TAG_TIMELINE_URL = tag => `/api/v1/timelines/tag/${tag}` const MASTODON_BOOKMARK_TIMELINE_URL = '/api/v1/bookmarks' -const AKKOMA_BUBBLE_TIMELINE_URL = '/api/v1/timelines/bubble' const MASTODON_USER_BLOCKS_URL = '/api/v1/blocks/' const MASTODON_USER_MUTES_URL = '/api/v1/mutes/' const MASTODON_BLOCK_USER_URL = id => `/api/v1/accounts/${id}/block` @@ -100,7 +99,7 @@ const PLEROMA_CHAT_URL = id => `/api/v1/pleroma/chats/by-account-id/${id}` const PLEROMA_CHAT_MESSAGES_URL = id => `/api/v1/pleroma/chats/${id}/messages` const PLEROMA_CHAT_READ_URL = id => `/api/v1/pleroma/chats/${id}/read` const PLEROMA_DELETE_CHAT_MESSAGE_URL = (chatId, messageId) => `/api/v1/pleroma/chats/${chatId}/messages/${messageId}` -const PLEROMA_ADMIN_REPORTS = '/api/v1/pleroma/admin/reports' +const PLEROMA_ADMIN_REPORTS = '/api/pleroma/admin/reports' const PLEROMA_BACKUP_URL = '/api/v1/pleroma/backups' const PLEROMA_ANNOUNCEMENTS_URL = '/api/v1/pleroma/admin/announcements' const PLEROMA_POST_ANNOUNCEMENT_URL = '/api/v1/pleroma/admin/announcements' @@ -112,10 +111,10 @@ const PLEROMA_USER_FAVORITES_TIMELINE_URL = id => `/api/v1/pleroma/accounts/${id const PLEROMA_BOOKMARK_FOLDERS_URL = '/api/v1/pleroma/bookmark_folders' const PLEROMA_BOOKMARK_FOLDER_URL = id => `/api/v1/pleroma/bookmark_folders/${id}` -const PLEROMA_ADMIN_CONFIG_URL = '/api/v1/pleroma/admin/config' -const PLEROMA_ADMIN_DESCRIPTIONS_URL = '/api/v1/pleroma/admin/config/descriptions' -const PLEROMA_ADMIN_FRONTENDS_URL = '/api/v1/pleroma/admin/frontends' -const PLEROMA_ADMIN_FRONTENDS_INSTALL_URL = '/api/v1/pleroma/admin/frontends/install' +const PLEROMA_ADMIN_CONFIG_URL = '/api/pleroma/admin/config' +const PLEROMA_ADMIN_DESCRIPTIONS_URL = '/api/pleroma/admin/config/descriptions' +const PLEROMA_ADMIN_FRONTENDS_URL = '/api/pleroma/admin/frontends' +const PLEROMA_ADMIN_FRONTENDS_INSTALL_URL = '/api/pleroma/admin/frontends/install' const PLEROMA_EMOJI_RELOAD_URL = '/api/pleroma/admin/reload_emoji' const PLEROMA_EMOJI_IMPORT_FS_URL = '/api/pleroma/emoji/packs/import' @@ -708,8 +707,7 @@ const fetchTimeline = ({ publicFavorites: PLEROMA_USER_FAVORITES_TIMELINE_URL, tag: MASTODON_TAG_TIMELINE_URL, bookmarks: MASTODON_BOOKMARK_TIMELINE_URL, - quotes: PLEROMA_STATUS_QUOTES_URL, - bubble: AKKOMA_BUBBLE_TIMELINE_URL + quotes: PLEROMA_STATUS_QUOTES_URL } const isNotifications = timeline === 'notifications' const params = [] diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 61eb5313f..d9e3d427a 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -91,8 +91,6 @@ export const parseUser = (data) => { output.bot = data.bot - output.privileges = [] - if (data.pleroma) { if (data.pleroma.settings_store) { output.storage = data.pleroma.settings_store['pleroma-fe'] @@ -319,18 +317,20 @@ export const parseStatus = (data) => { output.edited_at = data.edited_at - const { pleroma } = data - if (data.pleroma) { + const { pleroma } = data output.text = pleroma.content ? data.pleroma.content['text/plain'] : data.content output.summary = pleroma.spoiler_text ? data.pleroma.spoiler_text['text/plain'] : data.spoiler_text output.statusnet_conversation_id = data.pleroma.conversation_id output.is_local = pleroma.local - output.in_reply_to_screen_name = pleroma.in_reply_to_account_acct + output.in_reply_to_screen_name = data.pleroma.in_reply_to_account_acct output.thread_muted = pleroma.thread_muted output.emoji_reactions = pleroma.emoji_reactions output.parent_visible = pleroma.parent_visible === undefined ? true : pleroma.parent_visible - output.quote_visible = pleroma.quote_visible || true + output.quote = pleroma.quote ? parseStatus(pleroma.quote) : undefined + output.quote_id = pleroma.quote_id ? pleroma.quote_id : (output.quote ? output.quote.id : undefined) + output.quote_url = pleroma.quote_url + output.quote_visible = pleroma.quote_visible output.quotes_count = pleroma.quotes_count output.bookmark_folder_id = pleroma.bookmark_folder } else { @@ -338,12 +338,6 @@ export const parseStatus = (data) => { output.summary = data.spoiler_text } - const quoteRaw = pleroma?.quote || data.quote - const quoteData = quoteRaw ? parseStatus(quoteRaw) : undefined - output.quote = quoteData - output.quote_id = data.quote?.id ?? data.quote_id ?? quoteData?.id ?? pleroma.quote_id - output.quote_url = data.quote?.url ?? quoteData?.url ?? pleroma.quote_url - output.in_reply_to_status_id = data.in_reply_to_id output.in_reply_to_user_id = data.in_reply_to_account_id output.replies_count = data.replies_count diff --git a/src/services/timeline_fetcher/timeline_fetcher.service.js b/src/services/timeline_fetcher/timeline_fetcher.service.js index f64646593..d85fc7305 100644 --- a/src/services/timeline_fetcher/timeline_fetcher.service.js +++ b/src/services/timeline_fetcher/timeline_fetcher.service.js @@ -54,7 +54,7 @@ const fetchAndUpdate = ({ args.bookmarkFolderId = bookmarkFolderId args.tag = tag args.withMuted = !hideMutedPosts - if (loggedIn && ['friends', 'public', 'publicAndExternal', 'bubble'].includes(timeline)) { + if (loggedIn && ['friends', 'public', 'publicAndExternal'].includes(timeline)) { args.replyVisibility = replyVisibility } @@ -63,10 +63,6 @@ const fetchAndUpdate = ({ return apiService.fetchTimeline(args) .then(response => { if (response.errors) { - if (timeline === 'favorites') { - rootState.instance.pleromaPublicFavouritesAvailable = false - return - } throw new Error(`${response.status} ${response.statusText}`) }