Merge branch 'develop' into phillip/autocomplete-username

This commit is contained in:
Phillip Thelen 2018-11-27 15:47:00 +01:00 committed by GitHub
commit 664a457b47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -66,6 +66,7 @@
data () {
return {
newMessage: '',
sending: false,
chat: {
submitDisable: false,
submitTimeout: null,
@ -130,10 +131,10 @@
});
this.group.chat.unshift(response.message);
this.newMessage = '';
this.$refs['user-entry'].innerText = '';
this.sending = false;
this.$refs['user-entry'].innerText = '';
// @TODO: I would like to not reload everytime we send. Why are we reloading?
// The response has all the necessary data...
let chat = await this.$store.dispatch('chat:getChat', {groupId: this.group._id});

View file

@ -181,6 +181,7 @@ api.postChat = {
if (client) {
client = client.replace('habitica-', '');
}
const newChatMessage = group.sendChat(message, user, null, client);
let toSave = [newChatMessage.save()];