Browse Source

Fetch reactions in interval

master
Nero 5 years ago
parent
commit
38047b03cf
  1. 6
      app.js

6
app.js

@ -65,6 +65,10 @@ let kara = new Vue({ @@ -65,6 +65,10 @@ let kara = new Vue({
document.getElementById('chatinput').focus();
document.title = this.name;
setInterval(() => {
this.getReactions();
}, 15000);
this.scrollDown();
},
methods: {
@ -924,6 +928,8 @@ let kara = new Vue({ @@ -924,6 +928,8 @@ let kara = new Vue({
let Kara = this;
axios.get('/reactions/get').then((response) => {
Kara.reactions = [];
response.data.forEach((reaction) => {
Kara.reactions.push(JSON.parse(reaction.reaction));
});

Loading…
Cancel
Save