Add private note field to user profile
This commit is contained in:
parent
ca8689fc88
commit
9923ff587b
5 changed files with 44 additions and 3 deletions
|
@ -102,6 +102,11 @@ const unmuteDomain = (store, domain) => {
|
|||
.then(() => store.commit('removeDomainMute', domain))
|
||||
}
|
||||
|
||||
const setNote = (store, { id, note }) => {
|
||||
return store.rootState.api.backendInteractor.setNote({ id, note })
|
||||
.then((relationship) => store.commit('updateUserRelationship', [relationship]))
|
||||
}
|
||||
|
||||
export const mutations = {
|
||||
tagUser (state, { user: { id }, tag }) {
|
||||
const user = state.usersObject[id]
|
||||
|
@ -366,6 +371,9 @@ const users = {
|
|||
unmuteDomains (store, domain = []) {
|
||||
return Promise.all(domain.map(domain => unmuteDomain(store, domain)))
|
||||
},
|
||||
setNote (store, { id, note }) {
|
||||
return setNote(store, { id, note })
|
||||
},
|
||||
fetchFriends ({ rootState, commit }, id) {
|
||||
const user = rootState.users.usersObject[id]
|
||||
const maxId = last(user.friendIds)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue