fix mentioning user
This commit is contained in:
parent
0c46eca9d5
commit
e6f8208fbc
2 changed files with 4 additions and 5 deletions
|
|
@ -86,7 +86,7 @@ const PostStatusForm = {
|
||||||
|
|
||||||
// Replies/mentions
|
// Replies/mentions
|
||||||
repliedStatus: Object, // Object of a status replying to
|
repliedStatus: Object, // Object of a status replying to
|
||||||
profileMention: Boolean, // is mentioning a user (used in profile page -> mention)
|
profileMention: Object, // Mentioned user (used in profile page -> mention)
|
||||||
|
|
||||||
// Draft stuff
|
// Draft stuff
|
||||||
hideDraft: Boolean, // Disable drafts functionality
|
hideDraft: Boolean, // Disable drafts functionality
|
||||||
|
|
@ -262,8 +262,8 @@ const PostStatusForm = {
|
||||||
mentionsString() {
|
mentionsString() {
|
||||||
if (this.statusType !== 'reply' && this.statusType !== 'mention')
|
if (this.statusType !== 'reply' && this.statusType !== 'mention')
|
||||||
return ''
|
return ''
|
||||||
let allAttentions = [...(this.repliedStatus.attentions || [])]
|
let allAttentions = [...(this.repliedStatus?.attentions || [])]
|
||||||
const repliedUser = this.repliedStatus.user || this.profileMention
|
const repliedUser = this.repliedStatus?.user || this.profileMention
|
||||||
|
|
||||||
if (repliedUser) allAttentions.unshift(repliedUser)
|
if (repliedUser) allAttentions.unshift(repliedUser)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -491,8 +491,7 @@ export default {
|
||||||
},
|
},
|
||||||
mentionUser() {
|
mentionUser() {
|
||||||
usePostStatusStore().openPostStatusModal({
|
usePostStatusStore().openPostStatusModal({
|
||||||
profileMention: true,
|
profileMention: this.user,
|
||||||
repliedUser: this.user,
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onAvatarClickHandler(e) {
|
onAvatarClickHandler(e) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue