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)
|
this.$store.dispatch('fetchUser', userNameOrId)
|
||||||
.then(({ id, relationship, background_image }) => {
|
.then(({ id, relationship, background_image }) => {
|
||||||
this.note = relationship?.note
|
this.note = relationship?.note
|
||||||
|
if (this.note === undefined) {
|
||||||
|
this.$store.dispatch('fetchUserRelationshipNote', userNameOrId)
|
||||||
|
.then((resp) => {
|
||||||
|
this.note = resp
|
||||||
|
})
|
||||||
|
}
|
||||||
this.$store.dispatch('setDisplayBackground', background_image)
|
this.$store.dispatch('setDisplayBackground', background_image)
|
||||||
return loadById(id)
|
return loadById(id)
|
||||||
})
|
})
|
||||||
|
|
@ -163,6 +169,7 @@ const UserProfile = {
|
||||||
this.error = this.$t('user_profile.profile_loading_error')
|
this.error = this.$t('user_profile.profile_loading_error')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stopFetching () {
|
stopFetching () {
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,9 @@ const users = {
|
||||||
.then((relationships) => store.commit('updateUserRelationship', relationships))
|
.then((relationships) => store.commit('updateUserRelationship', relationships))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
fetchUserRelationshipNote (store, id) {
|
||||||
|
return store.rootState.api.backendInteractor.fetchUserRelationshipNote({ id })
|
||||||
|
},
|
||||||
fetchBlocks (store, args) {
|
fetchBlocks (store, args) {
|
||||||
const { reset } = 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 }) => {
|
const fetchFriends = ({ id, maxId, sinceId, limit = 20, credentials }) => {
|
||||||
let url = MASTODON_FOLLOWING_URL(id)
|
let url = MASTODON_FOLLOWING_URL(id)
|
||||||
const args = [
|
const args = [
|
||||||
|
|
@ -1799,6 +1806,7 @@ const apiService = {
|
||||||
removeUserFromFollowers,
|
removeUserFromFollowers,
|
||||||
fetchUser,
|
fetchUser,
|
||||||
fetchUserRelationship,
|
fetchUserRelationship,
|
||||||
|
fetchUserRelationshipNote,
|
||||||
favorite,
|
favorite,
|
||||||
unfavorite,
|
unfavorite,
|
||||||
retweet,
|
retweet,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue