commit: 631c2532aafdfcbdb19ea3d48c9ce143ce7ef376
parent e33734b4747c8484530644d759759d53266f9b0e
Author: Mark Felder <feld@feld.me>
Date: Fri, 7 Jun 2024 10:54:55 -0400
Fix profile mentions causing a 422 error
The Pleroma backend now reports an error when trying to reply to a status it cannot resolve we assume it is deleted or nonexistent. PleromaFE was in_reply_to_id: true as an internal method to trigger populating the post status form with the username of the profile being viewed and this was being submitted to the API as a result.
Diffstat:
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/changelog.d/profile-mentions.fix b/changelog.d/profile-mentions.fix
@@ -0,0 +1 @@
+Fix profile mentions causing a 422 error
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
@@ -87,7 +87,8 @@ const PostStatusForm = {
'fileLimit',
'submitOnEnter',
'emojiPickerPlacement',
- 'optimisticPosting'
+ 'optimisticPosting',
+ 'profileMention'
],
emits: [
'posted',
@@ -125,7 +126,7 @@ const PostStatusForm = {
const { scopeCopy } = this.$store.getters.mergedConfig
- if (this.replyTo) {
+ if (this.replyTo || this.profileMention) {
const currentUser = this.$store.state.users.currentUser
statusText = buildMentionsString({ user: this.repliedUser, attentions: this.attentions }, currentUser)
}
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js
@@ -225,7 +225,7 @@ export default {
this.$store.dispatch('setCurrentMedia', attachment)
},
mentionUser () {
- this.$store.dispatch('openPostStatusModal', { replyTo: true, repliedUser: this.user })
+ this.$store.dispatch('openPostStatusModal', { profileMention: true, repliedUser: this.user })
},
onAvatarClickHandler (e) {
if (this.onAvatarClick) {