diff options
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/backend_interactor_service/backend_interactor_service.js | 8 | ||||
| -rw-r--r-- | src/services/entity_normalizer/entity_normalizer.service.js | 9 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/services/backend_interactor_service/backend_interactor_service.js b/src/services/backend_interactor_service/backend_interactor_service.js index d6617276..c16bd1f1 100644 --- a/src/services/backend_interactor_service/backend_interactor_service.js +++ b/src/services/backend_interactor_service/backend_interactor_service.js @@ -1,6 +1,7 @@ import apiService from '../api/api.service.js' import timelineFetcherService from '../timeline_fetcher/timeline_fetcher.service.js' import notificationsFetcher from '../notifications_fetcher/notifications_fetcher.service.js' +import followRequestFetcher from '../../services/follow_request_fetcher/follow_request_fetcher.service' const backendInteractorService = credentials => { const fetchStatus = ({ id }) => { @@ -63,6 +64,10 @@ const backendInteractorService = credentials => { return notificationsFetcher.startFetching({ store, credentials }) } + const startFetchingFollowRequest = ({ store }) => { + return followRequestFetcher.startFetching({ store, credentials }) + } + // eslint-disable-next-line camelcase const tagUser = ({ screen_name }, tag) => { return apiService.tagUser({ screen_name, tag, credentials }) @@ -111,7 +116,6 @@ const backendInteractorService = credentials => { const subscribeUser = (id) => apiService.subscribeUser({ credentials, id }) const unsubscribeUser = (id) => apiService.unsubscribeUser({ credentials, id }) const fetchBlocks = () => apiService.fetchBlocks({ credentials }) - const fetchFollowRequests = () => apiService.fetchFollowRequests({ credentials }) const fetchOAuthTokens = () => apiService.fetchOAuthTokens({ credentials }) const revokeOAuthToken = (id) => apiService.revokeOAuthToken({ id, credentials }) const fetchPinnedStatuses = (id) => apiService.fetchPinnedStatuses({ credentials, id }) @@ -168,6 +172,7 @@ const backendInteractorService = credentials => { verifyCredentials: apiService.verifyCredentials, startFetchingTimeline, startFetchingNotifications, + startFetchingFollowRequest, fetchMutes, muteUser, unmuteUser, @@ -203,7 +208,6 @@ const backendInteractorService = credentials => { mfaSetupOTP, mfaConfirmOTP, mfaDisableOTP, - fetchFollowRequests, approveUser, denyUser, vote, diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 5f45660d..ca79df6f 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -46,6 +46,14 @@ export const parseUser = (data) => { output.description = data.note output.description_html = addEmojis(data.note, data.emojis) + output.fields = data.fields + output.fields_html = data.fields.map(field => { + return { + name: addEmojis(field.name, data.emojis), + value: addEmojis(field.value, data.emojis) + } + }) + // Utilize avatar_static for gif avatars? output.profile_image_url = data.avatar output.profile_image_url_original = data.avatar @@ -95,6 +103,7 @@ export const parseUser = (data) => { if (data.source) { output.description = data.source.note output.default_scope = data.source.privacy + output.fields = data.source.fields if (data.source.pleroma) { output.no_rich_text = data.source.pleroma.no_rich_text output.show_role = data.source.pleroma.show_role |
