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
|
||||
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
|
||||
hideDraft: Boolean, // Disable drafts functionality
|
||||
|
|
@ -262,8 +262,8 @@ const PostStatusForm = {
|
|||
mentionsString() {
|
||||
if (this.statusType !== 'reply' && this.statusType !== 'mention')
|
||||
return ''
|
||||
let allAttentions = [...(this.repliedStatus.attentions || [])]
|
||||
const repliedUser = this.repliedStatus.user || this.profileMention
|
||||
let allAttentions = [...(this.repliedStatus?.attentions || [])]
|
||||
const repliedUser = this.repliedStatus?.user || this.profileMention
|
||||
|
||||
if (repliedUser) allAttentions.unshift(repliedUser)
|
||||
|
||||
|
|
|
|||
|
|
@ -491,8 +491,7 @@ export default {
|
|||
},
|
||||
mentionUser() {
|
||||
usePostStatusStore().openPostStatusModal({
|
||||
profileMention: true,
|
||||
repliedUser: this.user,
|
||||
profileMention: this.user,
|
||||
})
|
||||
},
|
||||
onAvatarClickHandler(e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue