mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix(pm): correctly show sender info when a new pm is sent, fixes #12889
This commit is contained in:
@@ -924,8 +924,10 @@ export default {
|
|||||||
message: this.newMessage,
|
message: this.newMessage,
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
const newMessage = response.data.data.message;
|
const newMessage = response.data.data.message;
|
||||||
messages[messages.length - 1] = newMessage;
|
const messageToReset = messages[messages.length - 1];
|
||||||
this.selectedConversation.lastMessageText = newMessage.text;
|
messageToReset.id = newMessage.id; // just set the id, all other infos already set
|
||||||
|
messageToReset.text = newMessage.text; // handle mentions
|
||||||
|
Object.assign(messages[messages.length - 1], messageToReset);
|
||||||
this.updateConversationsCounter += 1;
|
this.updateConversationsCounter += 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user