0
0
Fork 0

Add limited attribute to accounts in REST API and a warning in web UI (#18344)

This commit is contained in:
Eugen Rochko 2022-05-10 09:44:35 +02:00 committed by GitHub
parent 898fe2fa8e
commit b4d373a3df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 166 additions and 59 deletions

View file

@ -175,3 +175,11 @@ export const getAccountGallery = createSelector([
return medias;
});
export const getAccountHidden = createSelector([
(state, id) => state.getIn(['accounts', id, 'hidden']),
(state, id) => state.getIn(['relationships', id, 'following']) || state.getIn(['relationships', id, 'requested']),
(state, id) => id === me,
], (hidden, followingOrRequested, isSelf) => {
return hidden && !(isSelf || followingOrRequested);
});