From f1e787c80713e503aea11d17a83ae2c3d6c22375 Mon Sep 17 00:00:00 2001 From: flashwave Date: Wed, 28 Aug 2024 21:14:19 +0000 Subject: [PATCH] Attempt to fix chat getting stuck on 'Authenticating...' after reconnecting. --- src/mami.js/sockchat/handlers.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mami.js/sockchat/handlers.js b/src/mami.js/sockchat/handlers.js index 6cfb060..3b5414c 100644 --- a/src/mami.js/sockchat/handlers.js +++ b/src/mami.js/sockchat/handlers.js @@ -100,7 +100,10 @@ const MamiSockChatHandlers = function( Umi.User.setCurrentUser(userInfo); Umi.Users.Add(userInfo); - sbUsers.createEntry(ev.detail.user); + if(sbUsers.hasEntry(ev.detail.user.id)) + sbUsers.updateEntry(ev.detail.user.id, ev.detail.user); + else + sbUsers.createEntry(ev.detail.user); if(ctx.views.count > 1) ctx.views.pop();