We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b947f26 commit bae418dCopy full SHA for bae418d
frontend/src/components/app/matches/Chat.vue
@@ -90,11 +90,11 @@ export default {
90
if (!this.message.length) {
91
return;
92
}
93
- await this.$http.post('/messages/send', {
+ const response = await this.$http.post('/messages/send', {
94
to_uid: this.user.id.toString(),
95
content: this.message,
96
});
97
- this.messages.push({ to_id: this.chatWithUserId, content: this.message });
+ this.messages.push(response.data.new_message);
98
this.message = '';
99
this.$emit('new-message');
100
this.scrollChatToBottom();
0 commit comments