mirror of
https://git.notfire.cc/notfire/akkoma-fe.git
synced 2026-01-11 13:33:24 -08:00
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:
parent
1083d6b4bc
commit
d47db568d2
3 changed files with 18 additions and 0 deletions
|
|
@ -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 () {
|
||||
|
|
|
|||
|
|
@ -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 || {}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue