From 827b45305516e7d6f070e52e28e28d57376a4b48 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Mon, 8 Jul 2024 22:17:23 +1200 Subject: [PATCH] fix for accidentally removing outbound chat items that don't have an id yet --- public/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index 106bc6c..c7c6686 100644 --- a/public/index.html +++ b/public/index.html @@ -2293,9 +2293,9 @@ // delete lxmf message from server await window.axios.delete(`/api/v1/lxmf-messages/${chatItem.lxmf_message.id}`); - // remove lxmf message from chat items + // remove lxmf message from chat items using hash, as other pending items might not have an id yet this.chatItems = this.chatItems.filter((item) => { - return item.lxmf_message?.id !== chatItem.lxmf_message.id; + return item.lxmf_message?.hash !== chatItem.lxmf_message.hash; }); } catch(e) {