aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web/src/components/Chat/Chat.jsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/web/src/components/Chat/Chat.jsx b/src/web/src/components/Chat/Chat.jsx
index 9224fb30..4fcb44ed 100644
--- a/src/web/src/components/Chat/Chat.jsx
+++ b/src/web/src/components/Chat/Chat.jsx
@@ -60,7 +60,13 @@ class Chat extends Component {
this.setState(
{
active: sessionStorage.getItem(activeChatKey) || '',
- interval: window.setInterval(this.fetchConversations, 5_000),
+ interval: window.setInterval(async () => {
+ try {
+ await this.fetchConversations();
+ } catch (error) {
+ console.error(error);
+ }
+ }, 5_000),
},
async () => {
await this.fetchConversations();
@@ -113,7 +119,6 @@ class Chat extends Component {
// check to see if the active chat is still active
// this will happen whenever a chat is closed/removed
if (activeConversation) {
- console.log('active?', activeConversation);
// *before* fetching messages, ack any unacked messages
// for the active chat
if (activeConversation.hasUnAcknowledgedMessages === true) {