From 2b9bdf8dacc5d2e4e9186e65f7d2051fef5362ec Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Tue, 2 Apr 2024 10:18:50 +0200 Subject: [PATCH] fixup! show sender on message --- frontend/src/rest/msg.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/rest/msg.js b/frontend/src/rest/msg.js index f724f2a..fb832dc 100644 --- a/frontend/src/rest/msg.js +++ b/frontend/src/rest/msg.js @@ -15,6 +15,7 @@ import { ref } from 'vue' */ export const discussionsList = ref(); export const currentDiscussion = ref([]); +let timerSet = false export async function createDiscussion(name){ @@ -50,6 +51,10 @@ async function fetchDiscussions(){ export async function fetchDiscussion(id){ currentDiscussion.value = await restGet("/discussion/" + id); + if(!timerSet){ + timerSet = true; + setTimeout(() => {timerSet = false;fetchDiscussion(currentDiscussion.value.id)} , 5000); + } } await fetchDiscussions();