From 2717177e1d90e8a930acae77b9cc2d42912b0bbe Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 14 Jun 2022 15:48:30 -0500 Subject: [PATCH] End a session that is over with nothing to say If status is completed or canceled and there are no children, then there's nothing more to say so just remove the session. --- .../java/eu/siacs/conversations/entities/Conversation.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index ec7e8c9b9190e7cab082d5c81cc6a42e9400b9fb..ee23e0e500baf9bb7b13b499916787c058e41063 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -1595,6 +1595,11 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl break; } } + + if (responseElement == null && (command.getAttribute("status").equals("completed") || command.getAttribute("status").equals("canceled"))) { + removeSession(this); + return; + } } if (actionsAdapter.getCount() > 0) {