jank shit to get the private note from the relationship route instead of the weird pleroma thing inside the user route

This commit is contained in:
notfire 2025-12-22 16:43:17 -05:00
commit d47db568d2
No known key found for this signature in database
3 changed files with 18 additions and 0 deletions

View file

@ -150,6 +150,12 @@ const UserProfile = {
this.$store.dispatch('fetchUser', userNameOrId)
.then(({ id, relationship, background_image }) => {
this.note = relationship?.note
if (this.note === undefined) {
this.$store.dispatch('fetchUserRelationshipNote', userNameOrId)
.then((resp) => {
this.note = resp
})
}
this.$store.dispatch('setDisplayBackground', background_image)
return loadById(id)
})
@ -163,6 +169,7 @@ const UserProfile = {
this.error = this.$t('user_profile.profile_loading_error')
}
})
}
},
stopFetching () {

View file

@ -349,6 +349,9 @@ const users = {
.then((relationships) => store.commit('updateUserRelationship', relationships))
}
},
fetchUserRelationshipNote (store, id) {
return store.rootState.api.backendInteractor.fetchUserRelationshipNote({ id })
},
fetchBlocks (store, args) {
const { reset } = args || {}

View file

@ -381,6 +381,13 @@ const fetchUserRelationship = ({ id, credentials }) => {
})
}
const fetchUserRelationshipNote = ({ id, credentials }) => {
const url = `${MASTODON_USER_RELATIONSHIPS_URL}/?id=${id}`
return promisedRequest({ url, credentials }).then((resp) => {
return resp[0].note
})
}
const fetchFriends = ({ id, maxId, sinceId, limit = 20, credentials }) => {
let url = MASTODON_FOLLOWING_URL(id)
const args = [
@ -1799,6 +1806,7 @@ const apiService = {
removeUserFromFollowers,
fetchUser,
fetchUserRelationship,
fetchUserRelationshipNote,
favorite,
unfavorite,
retweet,