End a session that is over with nothing to say

Stephen Paul Weber created

If status is completed or canceled and there are no children, then there's
nothing more to say so just remove the session.

Change summary

src/main/java/eu/siacs/conversations/entities/Conversation.java | 5 +++
1 file changed, 5 insertions(+)

Detailed changes

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) {